Hey everyone,
I'm really new to javascript and Google Scripts. I've got the code below. All I'm trying to do is have it look in column K for the set value then if that value exists copy D2 to D3. also id like it to skip/end/go to the next line if its not met. (just end the macro) but it always seems to copy the formula.
its just a test for a greater macro I'm trying to figure out. even when "2" doesn't exists in column K it still runs. if i set it to less than 2 it doesn't run.
any help would be great. Thank you.
var app = SpreadsheetApp;
var activeSheet = app.getActiveSpreadsheet().getActiveSheet();
var workingCell = activeSheet.getRange("K:K").getValues();
if (workingCell = 2) {
activeSheet.getRange('E2').activate();
activeSheet.getRange('D2').copyTo(activeSheet.getActiveRange(), SpreadsheetApp.CopyPasteType.PASTE_NORMAL, false);
}
else if(workingCell =! 2);{
return;
}
}