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 / July 2004

Tip: Looking for answers? Try searching our database.

Mutiple Conditions with a Nested IF statement

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sal - 05 Jul 2004 03:52 GMT
I would like to test whether multiple (more than 2)
conditions are met before returning the true value - I
have tried to do this with nested "AND" and "COMPARE"
statements nested in IF statements (as below), however
they only seem to work where there are only two
conditions - any more it always returns the false value

Can anyone suggest how I can overcome my problem?

{IF {=AND({COMPARE {MERGEFIELD One}= "1"} , {COMPARE
{MERGEFIELD Two}<> ""} , {COMPARE {MERGEFIELD Three}
> "2"})} = 1 "Hello" ""}

Thanks

Sal
macropod - 05 Jul 2004 11:07 GMT
Hi Sal,

Take a look at the Word document at:
http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=wrd&Number=365442
(url all one line)

There you'll find examples of how to use more than two conditions.

Cheers

> I would like to test whether multiple (more than 2)
> conditions are met before returning the true value - I
[quoted text clipped - 12 lines]
>
> Sal
Graham Mayor - 05 Jul 2004 11:45 GMT
Use a nested construction as follows:

{IF{Mergefield One} = 1 "{IF {Mergefield Two} <> "" "{IF{Mergefield Three} >
2 "Hello" ""}" ""}" ""}

Signature

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

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

> I would like to test whether multiple (more than 2)
> conditions are met before returning the true value - I
[quoted text clipped - 12 lines]
>
> Sal

Rate this thread:






 
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.