Search code examples
if-statementgoogle-sheetsformula

google sheets if- condition wrong evaluation as false


In my googele sheet the condition IF(A1-SUM(B1:E1)=0.01,TRUE,FALSE) evaluates "false" although A1 is 5 and the sum B1:E1 is 4.99. I'm trying for hours, some helpful thoughts would really be appreciated :)

see link below

Greetings, Kodi

google sheet


Solution

  • A possible case of floating point scenario which can cause this; You may try:

    =IF(round(A1-SUM(B1:E1),2)=0.01,TRUE,FALSE)
    

    enter image description here