I have an 'onEdit' script for a Google Sheets but only want it to work on one sheet:
function onEdit(event)
{
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = SpreadsheetApp.getActiveSheet();
var CellRow = SpreadsheetApp.getActiveRange().getRow();
var CellColumn = SpreadsheetApp.getActiveRange().getColumn();
if (CellColumn == 2 && CellRow == 3){
sheet.getRange(CellRow, CellColumn).setFormula( "=ArrayFormula(QUERY(ImportRange(\"0AmH7M5970cwZdHFRa3NITkdBSFhxd3JzYUZwbFRId3c\";\"Table!B2:J200\");\"select Col1 where Col1 = \'\"&$K$13&\"\' limit 1\"))");
Browser.msgBox("DON'T MESS WITH THE FORMULAS!");
}
}
How to I change the script so that it only works on one of the sheets in the worksheet?