A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Calculation involving mail merge field



 
 
Thread Tools Display Modes
  #1  
Old May 5th, 2004, 11:52 AM
simonc
external usenet poster
 
Posts: n/a
Default Calculation involving mail merge field

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.
  #2  
Old May 5th, 2004, 12:45 PM
Graham Mayor
external usenet poster
 
Posts: n/a
Default Calculation involving mail merge field

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



simonc wrote:
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.



  #3  
Old May 5th, 2004, 02:15 PM
simonc
external usenet poster
 
Posts: n/a
Default Calculation involving mail merge field

Brilliant. Many thanks, I always thought it should be
possible but Word Help wasn't very useful.
-----Original Message-----
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



simonc wrote:
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.



.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:26 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.