calculation in word mail merge

C

chilly1

I have a word document in which I want to calculate the percentage of a
dollar amount to get another dollar amount. The data source does include the
1st dollar amount and the merge letter has the percentage. Microsoft says I
can use bookmarks but it doesn't "show me how" or explain better. I've even
tried entering a formula in the table in my data source but keep getting
syntax error. Can anyone help?
 
D

Doug Robbins

If you select the percentage and insert a bookmark named percent, the
following field construction will calculate the percentage

{ = { REF percent }*{ MERGEFIELD currencymergefieldname } \ "$#,##0.00" }

if the percent bookmark also includes the % sign. If it does not, then you
would need to use

{ = { REF percent }*{ MERGEFIELD currencymergefieldname }/100 \
"$#,##0.00" }

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
C

chilly1

I must really be dense; I included the field (your example) in my word Data
Source under "Formula" but that's what was included on my merged letter (the
field construction); do I not do anything with the data source? I tried
inserting the bookmark in each of the mail merge doc and when that didn't
work, the data source.
 
M

macropod

Hi Chiily,

You don't need to do anything to the data source. Also, the field braces (ie
'{ }') are created in pairs via Ctrl-F9 - you can't simply type them in.

The simplest way to create the field would be to:
.. Duplicate your existing MERGEFIELD;
.. Select the duplicate MERGEFIELD
.. Press Ctrl-F9 to create another field around it. You should now have
something that looks like:
{ <<ProductValue>> }
.. Type between the field braces so that you get:
{=ROUND(<<ProductValue>>*10%,2) \# $,0.00}
for the percentage value in isolation, or
{=ROUND(<<ProductValue>>*110%,2) \# $,0.00}
for the aggregated initial value, plus the percentage.
.. Substitute your % for the 10% and changing both the '2' and the '00' to
match the required number of decimals
.. Press F9 to update the field

Cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top