![]() |
#1
|
|||
|
|||
![]()
Hi there,
I've managed to do some simple maths e.g. Performing a single operation on a mail merge field, and adding two mail merge fields together. I now need to add two fields together and then multiply that total by 1.2, to give a gross (post tax) total. I've had a look at the Field Maths tutorial, but I'm still struggling to get my head around whether there's a syntax to get it to do what I want all at once. Predictably, if I try... { ={ MERGEFIELD FIELD1}+{MERGEFIELD FIELD2} * 1.2} ...it of course only does the multiplication on FIELD2. Is there a way of getting it to do everything I want in a single line? By positioning the brackets differently? Or, as there are three operations, would I need to do something like use different variables to hold the results of FIELD1 * 1.2 and FIELD2 * 1.2 and then add those two variables together? If so, could you give me a pointer on the code for that? Changing the data at source would mean dev work, so if it's possible to do this within Word it would be much better. Thanks, Andy.T |
#2
|
|||
|
|||
![]()
I haven't tried it but logically it should be:
{ =({ MERGEFIELD FIELD1}+{MERGEFIELD FIELD2}) * 1.2} |
#3
|
|||
|
|||
![]() Quote:
![]() I'm a complete novice so I was thinking the solution would involve more curly brackets, I hadn't thought one could use standard brackets. |
#4
|
|||
|
|||
![]()
If you have another look at the Field Maths tutorial you will see several examples showing the use of brackets.
|
#5
|
|||
|
|||
![]()
This is simply using the parentheses to dictate the order of operations.
|
#6
|
|||
|
|||
![]() Quote:
I'm completely new to this, never done anything like this before. Thanks for your reply. ![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to get single line spacing? | abrogard | Word | 3 | 04-19-2022 04:39 AM |
How to perform summary calculations in multiple worksheets, merged cell format and new product issue | leeqiang | Excel Programming | 1 | 09-26-2020 11:14 PM |
![]() |
excerbated123 | Excel | 3 | 03-10-2015 07:11 AM |
![]() |
bracketandquotes | Word VBA | 17 | 02-16-2015 03:51 PM |
![]() |
George99 | Word | 2 | 01-24-2010 05:49 PM |