Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / February 2006

Tip: Looking for answers? Try searching our database.

Multiple IF condition

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Susan - 14 Feb 2006 01:36 GMT
Would appreciate the proper syntax for the following "If Statement":
If (HOUSE = BLUE or GREEN) and (STREET = COLOR) say "BLUE or GREEN"
otherwise say "NOT A MATCH".

This is how far I've gotten,
{IF {= OR ({COMPARE {MERGEFIELD HOUSE} = “BLUE”},{COMPARE {MERGEFIELD HOUSE}
= “GREEN”}, {COMPARE {MERGEFIELD STREET} = “COLOR”})} >1 “BLUE OR GREEN
COLOR” “NOT A MATCH”}

Thanks in advance
Signature

Susan

Graham Mayor - 14 Feb 2006 07:08 GMT
The following should work

{ IF{ =({ IF{ Mergefield House } = "BLUE" 1 0 } + { IF { Mergefield House }
= "GREEN" 1 0 } + { IF { Mergefield Street }  = "COLOR" 1 0})  } = 2 "BLUE
OR GREEN" "NOT A MATCH" }

See http://www.gmayor.com/formatting_word_fields.htm

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> Would appreciate the proper syntax for the following "If Statement":
> If (HOUSE = BLUE or GREEN) and (STREET = COLOR) say "BLUE or GREEN"
[quoted text clipped - 6 lines]
>
> Thanks in advance
macropod - 14 Feb 2006 07:26 GMT
Hi Susan,

There are numerous ways of doing this. One way is:

{IF{=({IF{MERGEFIELD House}= Blue 1 0}+{IF{MERGEFIELD House}= Green 1
0})*{IF{MERGEFIELD Street}= Color 1 0}}= 1 "BLUE or GREEN" "NOT A MATCH"}

Cheers

> Would appreciate the proper syntax for the following "If Statement":
> If (HOUSE = BLUE or GREEN) and (STREET = COLOR) say "BLUE or GREEN"
> otherwise say "NOT A MATCH".
>
> This is how far I've gotten,
> {IF {= OR ({COMPARE {MERGEFIELD HOUSE} = "BLUE"},{COMPARE {MERGEFIELD
HOUSE}
> = "GREEN"}, {COMPARE {MERGEFIELD STREET} = "COLOR"})} >1 "BLUE OR GREEN
> COLOR" "NOT A MATCH"}
>
> Thanks in advance
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.