
Signature
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
nick_hodgeTAKETHISOUT@zen.co.ukANDTHIS
web: www.nickhodge.co.uk
blog (non tech): www.nickhodge.co.uk/blog
Hello Nick,
Thank you for your response. The article you referenced was very useful.
However, I'm still concerned that Excel modifies the number I put in when I
hard-typed a specific number of decimal places. For example... I type in two
decimal point precision for two numbers and it computes a result that somehow
adds precision. If you type .03 - .01, shouldn't you get .02? I expect
the storing of of extra floating point values when Excel has to compute the
starting values, but I don't expect it when I type the exact decimal
precision.
Is there a way to force a 2 decimal number that is typed in to be stored as
exactly 2 decimals?
Thanks!
annie
> Anne
>
[quoted text clipped - 31 lines]
> > Microsoft
> > as a bug;
Ron Rosenfeld - 30 Aug 2007 00:55 GMT
>Hello Nick,
>
[quoted text clipped - 7 lines]
>starting values, but I don't expect it when I type the exact decimal
>precision.
Using decimal notation, how would you "exactly" type in 1/3? You can't do it
as the value 1/3 cannot be exactly expressed in decimal notation.
With a computer, although you may be entering decimal notation, the computer is
storing it as a binary number to the precision specified by the IEEE standard.
Many decimal numbers cannot be expressed "exactly" in binary notation, any more
than 1/3 can be expressed "exactly" in decimal notation.
> Is there a way to force a 2 decimal number that is typed in to be stored as
>exactly 2 decimals?
There are some side effects, but you can use:
Tools/Options/Calculation
Workbook Options
Select "Precision as displayed"
Or you can explicitly Round your entries by using the Round worksheet function.
However, for your Pivot Table, you will have to use a custom formula that does
the rounding.
Using your example, show the Pivot Table tool bar. Click on Pivot Table and
select Formulas/Calculated Field.
Name: rSum
Formula: =round(Amount,2)
Then, instead of Amount, drag rSum to the data area.
--ron
Bernard Liengme - 30 Aug 2007 01:51 GMT
You could force the result with =ROUND(0.03 - 0.01,2) or =ROUND(A1-B1,2)

Signature
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email
> Hello Nick,
>
[quoted text clipped - 61 lines]
>> > Microsoft
>> > as a bug;