Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-21-2018, 05:01 PM
macropod's Avatar
macropod macropod is online now Conditional checkbox mailmerge: coding "or" statements within IF statements Windows 7 64bit Conditional checkbox mailmerge: coding "or" statements within IF statements Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,518
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

Try field coding based on:


{IF{={IF{MERGEFIELD LABTEST1}= "Culture" 1 0}*({IF{MERGEFIELD DISEASE}= "Campylobacter" 1 0}+{IF{MERGEFIELD DISEASE}= "STEC" 1 0}+{IF{MERGEFIELD DISEASE}= "Salmonella" 1 0}+{IF{MERGEFIELD DISEASE}= "Shigella" 1 0}+{IF{MERGEFIELD DISEASE}= "Yersinia" 1 0})}> 0 "Checked" "Unchecked"}
or:
{IF{={IF«LABTEST1»= "Culture" 1 0}*({IF«DISEASE»= "Campylobacter" 1 0}+{IF«DISEASE»= "STEC" 1 0}+{IF«DISEASE»= "Salmonella" 1 0}+{IF«DISEASE»= "Shigella" 1 0}+{IF«DISEASE»= "Yersinia" 1 0})}> 0 "Checked" "Unchecked"}

Note: The field brace pairs (i.e. '{ }') for the above example 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). The spaces represented in the field constructions are all required.

In the Mailmerge Tips and Tricks 'Sticky' thread at the top of this forum (https://www.msofficeforums.com/mail-...ps-tricks.html) you'll find a macro under the heading Convert Text Representations of Fields to Working Fields that will convert either of the above into a working field code.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 05-22-2018, 08:20 AM
mtracy16 mtracy16 is offline Conditional checkbox mailmerge: coding "or" statements within IF statements Windows 10 Conditional checkbox mailmerge: coding "or" statements within IF statements Office 2016
Novice
Conditional checkbox mailmerge: coding "or" statements within IF statements
 
Join Date: May 2018
Location: Atlanta, GA
Posts: 2
mtracy16 is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
In the Mailmerge Tips and Tricks 'Sticky' thread at the top of this forum (https://www.msofficeforums.com/mail-...ps-tricks.html) you'll find a macro under the heading Convert Text Representations of Fields to Working Fields that will convert either of the above into a working field code.
I understand everything in your post until the macro... how do I insert the macro into the excel spreadsheet to change the coding of DISEASE and LABTEST1 from character to numeric 0,1 coding using the macro? Do I need to edit your macro to specify to convert only these variables? I am not understanding how to connect the excel spreadsheet to the macro & how to direct it to those specific variables. I am not familiar with macros at all so any further explanation/tips would be helpful.

Thank you!
Reply With Quote
Reply

Tags
check boxes, conditional merge fields, mailmerge field

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional checkbox mailmerge: coding "or" statements within IF statements legacy form fields conditional statements steelcity79 Word 3 05-05-2018 04:02 AM
Conditional checkbox mailmerge: coding "or" statements within IF statements saving conditional statements notalec Mail Merge 7 10-16-2017 09:34 PM
I know nothing about mail merge, but need help with conditional statements briyosa Word 1 03-27-2017 10:17 PM
Mailmerge certain text using multiple if statements Debs Mail Merge 4 06-19-2014 03:34 AM
"IF" "THEN" statements in Macros mfgeng_iss Misc 0 10-04-2007 07:31 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:09 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