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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|