View Single Post
 
Old 11-30-2016, 08:42 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

The simplest approach is to nest the fields or use independent fields. For example:
{IF«MyField»= "Option1" "Output for Option1 & 2"}{IF«MyField»= "Option2" "Output for Option1 & 2"}
or:
{IF«MyField»<> "Option1" {IF«MyField»= "Option2" "Output when neither Option1 nor Option2" "Output for Option1 & 2"}}
The first is simpler when nothing is to be output when either option is false; the second when there is always an output.

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, you can't type or copy & paste the chevrons (i.e. '« »') - they're part of the actual mergefields, which you can insert from the 'Insert Merge Field' dropdown. The spaces represented in the field construction are all required.

That said, there are ways of combining multiple AND and/or OR conditions. To see how to do that and a wide range of other calculations in Word, check out my Microsoft Word Field Maths Tutorial, at:
http://windowssecrets.com/forums/sho...Maths-Tutorial
or:
http://www.gmayor.com/downloads.htm#Third_party
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote