Home > Enterprise >  How to compare two formula (calculated) cells in Google Sheets
How to compare two formula (calculated) cells in Google Sheets

Time:05-31

I am trying to compare two formula (calculated) cells in Google Sheets but I am getting: Error - Formula parse error.

The two cells are:

  • =IF(OR(ISBLANK(E5), ISBLANK(H5)),"", E5-H5)
  • =IF(OR(ISBLANK(E5), ISBLANK(J5)),"", E5-J5)

And the cell I am trying to compare them in is:

  • =IF(K5==K4, "yes", "no")

An help on how to compare these cells?

CodePudding user response:

Tested your scenario and found out that if you have values on E5 and H5, then it works as long as it is numeric. Do something like

=IF(AND(ISNUMBER(E5), ISNUMBER(J5)), E5-J5, "")

So, if both cells are numbers, we subtract them, otherwise we have an empty value.

CodePudding user response:

use just one = sign:

=IF(K5=K4, "yes", "no")
  • Related