mardi 7 mai 2019

Google Script IF Statement for text

I need to write a Google Scripts IF Statement but for TEXT not Numeric values. If cell x contains "Yes" then y else z.

Small syntax issue in line 2. I've tried everything I can find to fix. Please help!

  var workingcell = activesheet.getRange(3, 4).getValue();
  if (workingcell == "Yes"){
    activesheet.getRange(4, 4).setValue("TASK - BC to be given access to IMS.");
  } else{
    activesheet.getRange(4, 4).setValue("TASK - BC to create Slack Channel.");
  }

Aucun commentaire:

Enregistrer un commentaire