Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Mail Merge

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 11-04-2017, 03:34 AM
SachinC SachinC is offline Windows 10 Office 2016
Novice
 
Join Date: Nov 2017
Posts: 5
SachinC is on a distinguished road
Default mail merge calculations

Hi there,


Using Office word 2016.
I have a Word doc that has within in it mailmerge fields called:-

1. <<Work.SubTotal>>
2. <<Labouramount>> (but I feel this is string so needs converting to number)
3. <<Sundriesamount>> (same comment as above - could be string)

I need to calculate:-

a. SubTotal - i.e. 1+2+3

Also, I need to calculate 20* VAT on the Subtotal, so if Subtotal = £20, then this will be £2.

Please help.

Thanks,

S
Reply With Quote
  #2  
Old 11-04-2017, 06:04 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,552
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

For the SubTotal:
{QUOTE{=«Work.SubTotal»+«Labouramount»+«Sundriesam ount»}}
For the VAT:
{QUOTE{=(«Work.SubTotal»+«Labouramount»+«Sundriesa mount»)*.1}}

Note: The field brace pairs (i.e. '{ }') for the above examples are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message. Nor is it practical to add them via any of the standard Word dialogues. Likewise, the chevrons (i.e. '« »') are part of the actual mergefields - which you can insert from the 'Insert Merge Field' dropdown (i.e. you can't type or copy & paste them from this message, either).
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #3  
Old 11-11-2017, 02:17 AM
SachinC SachinC is offline Windows 10 Office 2016
Novice
 
Join Date: Nov 2017
Posts: 5
SachinC is on a distinguished road
Default

hi,
that didn't work - and I made sure I wasn't typing it in - i.e entered the mailmerge fields properly. Could it be that my fields are Text - how do I convert from text to number please? Thanks.
Reply With Quote
  #4  
Old 11-11-2017, 02:19 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,552
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

It is of no consequence that the mergefields are 'text' - unless you mean the 'text' is non-numeric. Did you actually complete the merge, or did you just preview it? Previews are not a reliable indicator of the merged output.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #5  
Old 11-11-2017, 02:23 AM
SachinC SachinC is offline Windows 10 Office 2016
Novice
 
Join Date: Nov 2017
Posts: 5
SachinC is on a distinguished road
Default

In fact, I think I'm doing this completely wrong.
I'm using Word 2016 - can you give me step by steps on how to get this implemented please. My fields are in Text so the previous comment still stands.
I look forward to your response.
Reply With Quote
  #6  
Old 11-11-2017, 02:29 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,552
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Quote:
Originally Posted by SachinC View Post
In can you give me step by steps on how to get this implemented please.
Press Ctrl-F9 twice, insert your 3 mergefields between the inner pair, then fill in the balance of the field code as indicated in post #2.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #7  
Old 11-11-2017, 02:36 AM
SachinC SachinC is offline Windows 10 Office 2016
Novice
 
Join Date: Nov 2017
Posts: 5
SachinC is on a distinguished road
Default

Thanks for that. It just doesn't work! Help!
Reply With Quote
  #8  
Old 11-11-2017, 02:38 AM
SachinC SachinC is offline Windows 10 Office 2016
Novice
 
Join Date: Nov 2017
Posts: 5
SachinC is on a distinguished road
Default

...also, when I go to preview the formula - it's blank. When I do <Shift><F9> it only shows part of it. I think I'm doing it wrong, hence need step-by-step instructions
Reply With Quote
  #9  
Old 11-11-2017, 02:49 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,552
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Quote:
Originally Posted by SachinC View Post
...also, when I go to preview the formula - it's blank
Have you actually completed the merge. As I have already told you:
Quote:
Previews are not a reliable indicator of the merged output.
Quote:
Originally Posted by SachinC View Post
I think I'm doing it wrong, hence need step-by-step instructions
I have given you step-by-step instructions. There is nothing more to it than what you've been given.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
Reply

Tags
mergefield calculations

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I mail merge records into table columns with more than one merge field? tech123 Mail Merge 1 04-26-2017 07:13 PM
Mail Merge is Deleting objects in my header and footer during the merge bgranzow Mail Merge 9 06-05-2015 05:03 AM
Is data merge and mail merge the same thing? ikearns Mail Merge 1 09-12-2014 03:53 AM
Mail merge how to link mail merge field value to a column heading dsummers Mail Merge 1 05-08-2014 02:59 PM
Saving INDV mail merges During the mail merge sedain121 Mail Merge 2 10-04-2011 07:52 PM


All times are GMT -7. The time now is 06:26 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft