vendredi 29 septembre 2017

Google Script Custom Function simple IF statement not working

I am new to Google Scripts. I have created a custom function script in my Google Sheets spreadsheet. I know the process works because I have see the data being passed to the function and data being returned.

The problem that I have is with the IF statement. It is not finding "yes" even though there are multiple "yes" 's in the column. They all fail to the else. I even tried it with just the IF and no else but not seeing any "hello"'s.

So can you help me understand why this IF would not work? Why return input is returning the sent text but when inside the function it can't seem to qualify it?

Thank you for any help you can provide.

function DOUBLE(input) {

if (input == "yes") {
return "hello";

} else {

   return input;

}

}

Aucun commentaire:

Enregistrer un commentaire