View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Using OR statements in an If, then, else statement

Hi Gary,

Try:
{IF{={IF{MERGEFIELD XX}= "A" 1 0}+{IF{MERGEFIELD XX}= "B" 1 0}+{IF{MERGEFIELD XX}= "C" 1 0}} 0 "Print this"}
or
{IF{={IF«XX»= "A" 1 0}+{IF«XX»= "B" 1 0}+{IF«XX»= "C" 1 0}} 0 "Print this"}

Note: The field brace pairs (ie '{ }') for the above examples are created via Ctrl-F9 - you can't simply type them or copy & paste
them from this message. Likwise, you can't type the chevrons (ie '« »') - they're part of the actual mergefields, which you can
insert from the mailmerge toolbar.


--
Cheers
macropod
[Microsoft MVP - Word]


"Gary" wrote in message ...
I'm trying to create an "if, then, else statement". I understand the basics
of If {mergefield XX} = "A" "Print this" "Dont print this".

How do I have the statement search for multiple criteria..If {mergefield XX}
= "A or B or C" "Print this" "Dont print this"...without having to create a
statement for each variable individually.