View Single Post
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default calculations, precision in word

See fellow MVP Macropod's excellent work on math calculations in Word which
you can download from http://www.gmayor.com/downloads.htm#Third_party

With regard to your example - you can control exactly what you calculate by
using formatting switches eg

{ =24.99 * .8 \# "$,0.00"}
results in $19.99

{ =24.99 * .8 \# "$,0.000"}
results in $19.992

{ ={ =24.99 * .8 \# "0.00"} * 12 \# "$,0.00" }
results in $239.88

{ ={ =24.99 * .8 \# "0.000"} * 12 \# "$,0.00" }
results in $239.90


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




Shawn O'Connor wrote:
When doing certain calculations in word, such as a percent I get an
answer that is technically correct, but ends up carrying forward
decimal values that ultimately lead to an incorrect displayed result.
For example, if I wish to calculate 20% off of some dollar amount --
say $24.99 I get 19.992. OK, fine...except that if I carry forward
that calculated value in another field as a value for another
equation that extra .002 throws the calculated value off. It's a few
pennies different than if I had just used 19.99 as the basis for the
calculation. For example, If I say $19.992 * 12 that equals 239.90,
but if I use 19.99 then the value is 239.88. I know, splitting
hairs, but when your published number is $19.99 the value should be
exact.

I know in Excel there is a preference one can select to "set
precision as displayed" to handle this exact problem. Is there
something like that in Word? Or some other way around this problem?
-- Thanks.