Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 09-22-2024, 06:29 PM
macropod's Avatar
macropod macropod is offline Help! Multiple conditional statements in mail merge Windows 10 Help! Multiple conditional statements in mail merge Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,521
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

From what you describe, your fields should be coded as:

Code:
{IF{MERGEFIELD Cover_Type}= "E1" {IF{MERGEFIELD Overseas}<> "" "Sentence for this cover"}}
and:
Code:
{IF{MERGEFIELD Waits_Apply}= "Y" {IF{MERGEFIELD Previous_Extras}= "Y" "Sentence for upgrading waits" "Sentence for previous extras"} "Sentence for waits apply"}
If your 'Previous Extras' data field can have content other than Y or N, use:
Code:
{IF{MERGEFIELD Waits_Apply}= "Y" {IF{MERGEFIELD Previous_Extras}= "Y" "Sentence for upgrading waits" {IF{MERGEFIELD Previous_Extras}= "N" "Sentence for previous extras" "Sentence for not Y/N"}} "Sentence for waits apply"}
You can omit the "Sentence for not Y/N" if there's not output for that condition.

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 or, if you’re using a laptop, you might need to use Ctrl-Fn-F9); 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. The spaces represented in the field constructions are all required.

For a macro to convert the above field code representations into working field codes, see Convert Text Representations of Fields to Working Fields in the Mailmerge Tips and Tricks 'Sticky' thread at the top of this page: https://www.msofficeforums.com/mail-...ps-tricks.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! Multiple conditional statements in mail merge Mail Merge - Conditional Statements Utang Mail Merge 2 03-11-2024 03:35 AM
Help! Multiple conditional statements in mail merge Multiple Conditional formating within MS Mail Merge from Excel SCOATS Mail Merge 3 06-05-2019 06:55 PM
Help! Multiple conditional statements in mail merge IF Statements for a several ranges of values using Mail Merge Jennifert Mail Merge 2 05-01-2019 09:40 PM
I know nothing about mail merge, but need help with conditional statements briyosa Word 1 03-27-2017 10:17 PM
Help! Multiple conditional statements in mail merge Using multiple IF statements on a mail merge ajh19742000 Mail Merge 1 11-01-2016 06:11 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:27 PM.


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