Why Are These Not The Same

will2learn

Board Regular
Joined
Dec 1, 2005
Messages
144
I'm using a conditional format in order to highlight if two cells do not match. For some reason they are shown as errors even though they appear the same. I changed the cell format to numbers and have noticed that the numbers differ slightly.

Can anyone advise why this has happened?

Original Format
00:05 00:05
01:15 01:15
00:24 00:24
01:50 01:50

Format shown as numbers
0.003472222222222220000000000000 0.003472222222222320000000000000
0.052083333333333300000000000000 1.052083333333330000000000000000
0.016666666666666700000000000000 0.016666666666666600000000000000
0.076388888888888900000000000000 0.076388888888888800000000000000
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
It's because of the way computers store and do calcuations with floating point numbers.

If you typed all those values directly in the cells each pair should be equal but it one of them is a result of a calculation it might differ slightly.

I'm sure someone else can give a far better, more technical explanation.:)
 
Upvote 0
It's because of the way computers store and do calcuations with floating point numbers.

If you typed all those values directly in the cells each pair should be equal but it one of them is a result of a calculation it might differ slightly.

I'm sure someone else can give a far better, more technical explanation.:)
Here's some related info from MS:

Understanding IEEE Floating Point Errors

http://support.microsoft.com/kb/42980

How to correct rounding errors in floating point arithmetic

http://support.microsoft.com/kb/214118
 
Upvote 0

Forum statistics

Threads
1,224,537
Messages
6,179,408
Members
452,912
Latest member
alicemil

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