How exactly do you use isBlank() in a google apps script function?
function pushGeo()
{
var ssA = SpreadsheetApp.openById('###')
var ss = ssA.getSheetByName('mySheet');
var lastRow = ss.getLastRow();
var data = ss.getRange('G2:G'+lastRow);
for(var row=2;row<=lastRow;row++)
{
ss.getRange('G'+row+':G'+row).isblank(); // not working
if(isblank(data),'0','G'+row); // not working
}
}
I want to check a column 'G' for blank cells. If the cell is blank, I want to set its value to '0'. Ultimately, I want to take the column 'G' that was just checked for empty cells and compare it to another column 'N'. If the row in column 'G' is NOT empty (now with value '0') then push the value of column 'G' into column 'N'. Wanted to change the empty cells to '0' so that I can "see" the code better, easier comparison, etc.
If you have a a lot of data on a sheet you might want to consider doing it this way it runs a lot faster because you get and set all data just one time.