Вы, вероятно, хотите что-то вроде этого:
//Set data in column B to blank if column A is blank in that row
function clearRows() {
//First get the data
var sheet = SpreadsheetApp.getActive().getActiveSheet();
var data = sheet.getRange(1, 1, sheet.getLastRow(), sheet.getLastColumn()).getValues();
//now loop through each row
for(var i = 0; i < data.length; ++i){
//if comlun A is blank
if(data[i][0] == ""){
//Then set column B to blank
data[i][1] = "";
}
}
//Save the new data to the sheet
sheet.getRange(1, 1, data.length, data[0].length).setValues(data);
}