Calculation involving mail merge field

S

simonc

I have a Word mailmerge document which is taking its data
from an Excel spreadsheet.

I know how to put a calculation in the Word document, eg
multiplying two cells in a table. I know how to put a
Merge Field in the Word document. But how do you put in a
calculation which uses a Merge Field as one of the inputs?
I have tried various combinations but always end up with a
Syntax Error.

To give more detail:
The Word document is an invoice, showing no of days
worked, and daily rate: x days at DailyRate1, y days at
DailyRate2 etc where x and y are Merge Fields in the
source data spreadsheet. The rates are not in the
spreadsheet as these do not vary from month to month. I
want the word document to show the subtotals of x
multiplied by DailyRate1 and y multiplied by DailyRate2. I
know I could add extra fields to the source spreadsheet
with these results but I wanted to avoid doing this as it
will make the spreadsheet too wide to fit on the screen.

Grateful for any advice.
 
G

Graham Mayor

Something along the lines {=({Mergefield x} * 100) \# "$,0.00" }
Where 100 is the daily rate will give you the result for x
{=({Mergefield y} * 120) \# "$,0.00" }
Where 120 is the daily rate will give you the result for y
and
{=(({Mergefield x} * 100) + ({Mergefield y} * 120)) \# "$,0.00" }
will give you the total for x + y

Don't forget CTRL+F9 for each pair of field brackets
--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 
S

simonc

Brilliant. Many thanks, I always thought it should be
possible but Word Help wasn't very useful.
 

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