1

I have a simple IF statement in Google Sheets that is not computing correctly but it is computing correctly in Excel. The formula is =IF(G15="TRUE",1,0) and G15 is a cell with "TRUE" in it and the result is 0. I have checked the format of my reference cell and it is plain text.

Can someone tell me why this is not computing as 1?

Google Sheet Screenshot

3
  • 1
    Welcome to Web Applications. Are you sure that the value is "TRUE" (TEXT) and not TRUE (boolean)? How do you come sure about that? Commented Jul 23, 2020 at 0:34
  • 1
    @Rubén that was it, you're correct. Once I dropped the quotes the formula was computing correctly. Thanks!
    – Taylor
    Commented Jul 23, 2020 at 17:05
  • please the fix that you applied as an answer (comments as intended to be temporary and could be deleted at anytime) Commented Jul 23, 2020 at 17:17

2 Answers 2

1

The correct formula is:

=IF(G15=TRUE,1,0)

That is, drop the quotes around TRUE.

0

while it does work to remove the quote marks so that the formula is now:

=IF(G15=TRUE,1,0)

It is better to change it to:

=IF(G15,1,0)

The first parameter in the IF() function is evaluated as either being true or false. That evaluation determines which of the next two parameters is used as the value of the cell where the formula is located.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.