Weird anomaly I found today, any ideas?

Rusty

Board Regular
Joined
Apr 8, 2002
Messages
108
After building this wizz bang data importer/manipulator/exporter (Won't bore you with the details) for a client, and it all running smoothly, it bugged out today...

Got bounced back to me as an issue, and after a while of analysing the source, process and output, I came across this weird anomaly and thought I would get your opinons (if you please)

1) Open a new workbook.
2) Enter into any cells the following: eg:

A1: -9.88
A2: 9.60
A3: = A1 + A2

Logical answer is -0.28, no?

Now change the formatting of the cells to be a number with 15 decimal places.

The result in cell A3 is now: -0.280000000000001

WTF? :eek:

Where did that 1 come from? Can anyone explain that to me?
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,214,991
Messages
6,122,628
Members
449,095
Latest member
bsb1122

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