I want to delete the entire row if the cell in column A has any content.
I'm new to this, but I've tried a couple of scripts online.
Here is the link to my spreadsheet.
I want to delete the entire row if the cell in column A has any content.
I'm new to this, but I've tried a couple of scripts online.
Here is the link to my spreadsheet.
function delRowIfColA() {
var ss=SpreadsheetApp.getActive();
var sh=ss.getSheetByName('Sheet1');
var rg=sh.getRange(4,1,sh.getLastRow(),sh.getLastColumn());
var vA=rg.getValues();
var d=0;
for(var i=0;i<vA.length;i++) {
if(vA[i][0]) {
sh.deleteRow(i+4-d++);
}
}
}