mardi 29 septembre 2020

Why does this Google Sheets IF statement return "#Value" instead of "0"

I have a pretty simple IF statement in my google sheet:

=IF(SEARCH("PM",K2)>0,1,0)

Basically, I'm asking if cell K2 has "PM" in it. K2 is a time in the format of "H:MM:SS AM/PM". When this returns true, it gives me a value of "1", otherwise it gives me "#VALUE" with an error of

In SEARCH evaluation, cannot find 'PM' within '8:02:48 AM'.

Why the heck won't this return as "0"?

Aucun commentaire:

Enregistrer un commentaire