Forum Discussion

J-Des000's avatar
J-Des000
Brass Contributor
Jan 08, 2025

IF Function not working with subtraction

Not sure what I'm doing wrong here or if this is a glitch in Excel,

 

EX:

A1 = 50.50

A2 = 50.10

A3 = 0.40

 

A4 = ((A1)-(A2)-(A3))

 

FORMULA:

IF(A4=0,"Equal to Zero","Not Zero")

 

For some reason the function always returns "Not Zero" even though A4 equals to 0.

 

How do I fix this? Thanks in advance!

1 Reply

  • This is due to (unavoidable) tiny rounding errors. Try

    =IF(ROUND(A4, 2)=0, "Equal to Zero", "Not Zero")

    I rounded to 2 decimal places since the input cells A1:A3 have 2 decimal places.

Resources