Google Sheets gives me the wrong result. In the first row (M38) I write the number manually; in the second row (M39) I have a SUM for my data. Both results are the same, as you see. However, when I apply the formula IF(M38 = M39, true, false) the result is FALSE.

Could someone explain to me the reason or what is wrong?

enter image description here enter image description here

  • both results are same as you see Recommended reading: Is floating point math broken? – user55949 Mar 8 '19 at 9:23
  • pls, share a copy of your sheet – user0 Mar 8 '19 at 12:11
  • Welcome. Cell display values could be different from the actual values. Please add more details. If you decide to share a demo spreadsheet, please add to it only the minimum sheets, formulas, values, etc. to reproduce the problem. – Rubén Mar 8 '19 at 16:13
  • reason 1: the 1st cell is not formatted properly (eg. it's formatted as text). try to check it with =ISNUMBER(M38) - if it returns TRUE this reason is invalid

  • reason 2: cell M39 shows you only the rounded number, not the whole number. (it could be for example: 957.9787000000666667 and you see only first 10 characters 957.9787000). you can wrap your formula in M39 into =ROUND(M39_formula_here,7) or try to check it with: =IF(M38 = ROUND(M39,7), TRUE, FALSE)

  • reason 3: it's also possible that M39 is returned as a text-formatted string. in that case wrap your M39 formula into VALUE - =VALUE(M39_formula_here)

| 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.