Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
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. |
#3
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
See the example at http://www.gmayor.com/formatting_word_fields.htm -
Testing for a value in one of several fields Instead of referring to three fields refer to the same one three times with the three different conditions. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Gary wrote: 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. |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
If statements | Mailmerge | |||
If then statements | Mailmerge | |||
which statement right , question is Choose the correct statement? | Microsoft Word Help | |||
which statement right , question isChoose the correct statement? | Microsoft Word Help | |||
Multiple "OR" statements in a single "IF" statement | Mailmerge |