Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-16-2024, 04:34 AM
Andy.T Andy.T is offline Multiple calculations in a single line? Windows 11 Multiple calculations in a single line? Office 2021
Novice
Multiple calculations in a single line?
 
Join Date: Jul 2024
Posts: 5
Andy.T is on a distinguished road
Default Multiple calculations in a single line?


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
Reply With Quote
 



Similar Threads
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
Multiple calculations in a single line? Need help with mind bending calculations taken from values in multiple places excerbated123 Excel 3 03-10-2015 07:11 AM
Multiple calculations in a single line? macro to add brackets to each line and add single quotes to each word in the line bracketandquotes Word VBA 17 02-16-2015 03:51 PM
Multiple calculations in a single line? Different alignments in a single line George99 Word 2 01-24-2010 05:49 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:41 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft