confused by rounding error at 14th decimal place

gemmae

New Member
Joined
Dec 3, 2011
Messages
5
I've been learning how to use conditional formatting and decided to apply it to my bank account records that I have stored in Excel. I wanted to check for missing sections in my statement in case I lost any transactions when exporting the data in little chunks at my internet banking website.

I built my conditional formatting around a straightforward true/false rule.

= Balance = PreviousBalance minus Debit plus Credit

In a handful of rows this is throwing up a False when balance is correct. After some playing around I discovered that Excel was introducing an error at the 14th decimal place.

When A1 is 67.13, A2 is 72.43, Excel calculates =A1-A2 as -5.3000000000000100000

Some Googling led me to this post at Microsoft Answers. But I don't understand how/where I am supposed to be using the Round function.

[Excel 2007, Windows 7.]
 
Last edited:

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
What then is the purpose of the double negative at the front? <!-- / message -->

And for CF, it's not necessary. I should have written just

=ABS($H3-$H2+$F3-$G3) > 0.0001
 
Upvote 0
And for CF, it's not necessary. I should have written just

=ABS($H3-$H2+$F3-$G3) > 0.0001

Shg, Thanks for the clarification as I thought this afternoon that there was another use that I was unaware of.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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