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

  • 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? – Rubén Jul 23 at 0:34
  • 1
    @Rubén that was it, you're correct. Once I dropped the quotes the formula was computing correctly. Thanks! – Taylor Jul 23 at 17:05
  • please the fix that you applied as an answer (comments as intended to be temporary and could be deleted at anytime) – Rubén Jul 23 at 17:17
1

The correct formula is:

=IF(G15=TRUE,1,0)

That is, drop the quotes around TRUE.

| improve this answer | |
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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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