I'd like to send an email to a specific person depending on the data in the last row, similar to the vlookup function. If the data entered in the form is x then send mail to joe, if data is y send mail to jack etc. I'm confused on how range selection works when there is no active range like when you have in the spreadsheet view.
function sendEmails()
{
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var row = sheet.getLastRow();
var data = sheet.getRange(row, 5).getValue();
if (data == "xxx")
{
sendmail //i got this
}