Iferror miscalculation

alanshep

New Member
Joined
Feb 18, 2013
Messages
3
Interesting one for you all - Excel 365.

If I use a simple formula to subtract 1-1 I get, as you would expect a 0 (Row 2)

However, if I nest this inside an iferror formula I get a very strange answer (yellow cell). (Row 3)

Anyone any thoughts on why this is happening?
 

Attachments

  • Iferror error.PNG
    Iferror error.PNG
    4.4 KB · Views: 9

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Interesting one for you all - Excel 365.

If I use a simple formula to subtract 1-1 I get, as you would expect a 0 (Row 2)

However, if I nest this inside an iferror formula I get a very strange answer (yellow cell). (Row 3)

Anyone any thoughts on why this is happening?

Yep, that is the famous floating-point arithermetic error.
See here: Floating-point arithmetic may give inaccurate result in Excel - Office

I usually get around it by using the Round function, as described in that article.
Thanks Joe, for the quick answer!
But my poor head is a bit confused. 1-1 is a simple 0, there should be no decimal places floating or otherwise.
Why is this only happening inside the iferror formula and not when the calculation is not nested? There still should be no rounding or data truncation.
 
Upvote 0
Thanks Joe, for the quick answer!
But my poor head is a bit confused. 1-1 is a simple 0, there should be no decimal places floating or otherwise.
Why is this only happening inside the iferror formula and not when the calculation is not nested? There still should be no rounding or data truncation.
Note that you are NOT doing 1-1.
You are doing 1-A3.

So you are not subtracting the same thing from itself.
You are subtracting two different objects (which appear to be the same, but are not for the reasons described in the article).
 
Upvote 0

Forum statistics

Threads
1,215,444
Messages
6,124,893
Members
449,194
Latest member
JayEggleton

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top