I have a spreadsheet with 6 columns, the first 3 rows are reserved for heading. Once the user enters information in 5 cells of the row he would execute a script that would send an email. The 6th cell is for showing EMAIL_SENT after the email was sent.
What i have problem with is error checking, i dont want the user to send an email without all five cells having data in it.
function Email() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet();
var range = sheet.getDataRange();
range = range.offset(3, 0, range.getNumRows()-3);
range.getValues().forEach( function( recipient, index, data ){
if (recepient[0] == ""){Browser.msgBox("No data in column A");}
.
.
.
});
}
I was hoping i could check if the cell is equal to nothing, blank and notify but this is not working.
Your help is much appreciated. :)