i have this script to delete certain rows, if the selected cell in the selected colum has the metioned content but i don\'t understand where it fails
fun
You need to ensure that the index for deletion is the correct index. When you delete a row all bellow rows has their indexes changed -1. So try this code:
if (dataCopy1.length > 0) {
var i = 1;
while (i < DATA_SHEET.getMaxRows() - deleted_rows) {
if ((dataCopy1[i][FIRST_COLUMN]).search(value_to_check) != -1) {
ss.deleteRow(i - deleted_rows);
deleted_rows++;
}
i++;
}
}