Word XP decreasing decmials in calc

S

scb_55_55

Not sure if this is the right group.

In Word XP (SP3 - latest securty, W-XP SP2, 1.4GHz, Latitude D600),
I've mailmerged somce values from Access XP. The merge numbers are ok
(formatted Single with 10 decimal places in Access).

When performing a simple calc (division), Word is displaying the right
number of decimal places. The equation looks like:
=1.02154*.45 + 1.104*.2 + 1.01613*.1 + 1.04167*.25
The 5 decimal place numbers are all calculated (from mailmerge values)
and formated as:
{bookmark \# "#,###.#####"}
When performing the next calculation, Word seem to be losing one
decimal place for each new figure in the equation.
Should be:
=.45965 + .2208 + .10161 + .26042 (.2208 is only 4 places anyhow)
Word is returning (this is with formatting as {bookmark \#
"#,###.#####"}):
=.45965 + .2208 + .101 + .26
If I changed the format (for the last component) to {bookmark \#
"#,##0.00000"}, Word returns:
=.45965 + .2208 + .101 + .26000

Any ideas?

TIA
 
C

Cindy M -WordMVP-

In Word XP (SP3 - latest securty, W-XP SP2, 1.4GHz, Latitude D600),
I've mailmerged somce values from Access XP. The merge numbers are ok
(formatted Single with 10 decimal places in Access).
I'm not quite clear on where all these numbers and equations are. The
original values are coming in from Access, as separate merge fields, I
take it. so the equation would actually be like this?
{ = { Mergefield 1} * .45 + { Mergefield 2 } * .2 } 'etc

What's this: {bookmark \# "#,###.#####"} ? There's no such thing as a
"bookmark" field. And bookmarks are risky things during a mail merge.
Have you put a bookmark around the equation and are referencing that?

Are you sure the numbers in the second example are truly coming in with
all decimal places? Just because they do in one record doesn't mean they
will in another...

My recommendation would be to make these calculations in an Access
query, which you use as the data source. Access will calculate much more
quickly and accurately than Word. To "create a field" in an Access
query, you place an "expression" in an empty query column. For example:

total: Field1*.45 + Field2*.2 'etc.

The "total" field will appear in the dynaset result and be available in
Word's mergefield list.
When performing a simple calc (division), Word is displaying the right
number of decimal places. The equation looks like:
=1.02154*.45 + 1.104*.2 + 1.01613*.1 + 1.04167*.25
The 5 decimal place numbers are all calculated (from mailmerge values)
and formated as:
{bookmark \# "#,###.#####"}
When performing the next calculation, Word seem to be losing one
decimal place for each new figure in the equation.
Should be:
=.45965 + .2208 + .10161 + .26042 (.2208 is only 4 places anyhow)
Word is returning (this is with formatting as {bookmark \#
"#,###.#####"}):
=.45965 + .2208 + .101 + .26
If I changed the format (for the last component) to {bookmark \#
"#,##0.00000"}, Word returns:
=.45965 + .2208 + .101 + .26000

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 
S

scb_55_55

I was suspecting that I would have more success in Access.

All of the numbers from the merge are coming over as defined in Access.
The equation as displayed has already performed a calcualtion based on
the merge fields (Mergefield1/Mergefield2=1.02154). The calc results
are all formated to be #.#####. 1.02154 then becomes bookmarked to use
in the next equation (Bookmark1 *.45= Result1). I am showing each part
of the equation's results seperately. Again, the formats are #.#####.
This is where the decimals seem to get truncated. Result 1 is then
bookmarked for the next equation to give the final result
(Result1+Result2+...=Total).

I'll do my calc's in Access and merge the results from there.

Thanks Cindy.
 
C

Cindy M -WordMVP-

The equation as displayed has already performed a calcualtion based on
the merge fields (Mergefield1/Mergefield2=1.02154). The calc results
are all formated to be #.#####. 1.02154 then becomes bookmarked to use
in the next equation (Bookmark1 *.45= Result1).
I suspect this may be where the disconnect is occurring. Generally, Word
has problems if you reference one set of calculations in another formula.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
Top