Reply
 
Thread Tools Display Modes
  #1   Report Post  
RC
 
Posts: n/a
Default 3 possibilities for IF

I cannot find a post that adddressed my issue specifically, most of the
posts similar to this only relates to having 2 options...

Since there is apparently not an easy way to use "OR" statments, I need
to be able to create the following logic in my document:

IF {MERGEFILED Blah } = "A" or "B" or "C" then "YES" else "NO"

Any help would be appreciated. Thanks!

-Rich

  #2   Report Post  
Doug Robbins - Word MVP
 
Posts: n/a
Default 3 possibilities for IF

{ IF {MERGEFIELD Blah } = "A" "Yes" { IF {MERGEFIELD Blah } = "B" "Yes" { IF
{MERGEFIELD Blah } =""C" "YES" "NO" }}}

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"RC" wrote in message
ps.com...
I cannot find a post that adddressed my issue specifically, most of the
posts similar to this only relates to having 2 options...

Since there is apparently not an easy way to use "OR" statments, I need
to be able to create the following logic in my document:

IF {MERGEFILED Blah } = "A" or "B" or "C" then "YES" else "NO"

Any help would be appreciated. Thanks!

-Rich



  #3   Report Post  
RC
 
Posts: n/a
Default 3 possibilities for IF

Perfect. Thanks!

-Rich

  #4   Report Post  
computergeek
 
Posts: n/a
Default 3 possibilities for IF

Although that does work well for one word results (Ex. Yes.) It is not
practical for a lenghty result which, if needed to be modified, would have to
be modified in TWO or THREE places. Also, what if there are more than three
options in your merge field? I think your example works well if there are
only three variables and you have only short results which never will need to
be modified. Is there an OR argument, like RC asks? If mergefield = A or B
then "Yes" if not then "No"
See how "yes" only appears once and if the answer is anything between C-Z
you still get the other answer?

"Doug Robbins - Word MVP" wrote:

{ IF {MERGEFIELD Blah } = "A" "Yes" { IF {MERGEFIELD Blah } = "B" "Yes" { IF
{MERGEFIELD Blah } =""C" "YES" "NO" }}}

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"RC" wrote in message
ps.com...
I cannot find a post that adddressed my issue specifically, most of the
posts similar to this only relates to having 2 options...

Since there is apparently not an easy way to use "OR" statments, I need
to be able to create the following logic in my document:

IF {MERGEFILED Blah } = "A" or "B" or "C" then "YES" else "NO"

Any help would be appreciated. Thanks!

-Rich




  #5   Report Post  
Doug Robbins - Word MVP
 
Posts: n/a
Default 3 possibilities for IF

My view is that data manipulation is really best done in a database.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"computergeek" wrote in message
...
Although that does work well for one word results (Ex. Yes.) It is not
practical for a lenghty result which, if needed to be modified, would have
to
be modified in TWO or THREE places. Also, what if there are more than
three
options in your merge field? I think your example works well if there are
only three variables and you have only short results which never will need
to
be modified. Is there an OR argument, like RC asks? If mergefield = A or B
then "Yes" if not then "No"
See how "yes" only appears once and if the answer is anything between C-Z
you still get the other answer?

"Doug Robbins - Word MVP" wrote:

{ IF {MERGEFIELD Blah } = "A" "Yes" { IF {MERGEFIELD Blah } = "B" "Yes"
{ IF
{MERGEFIELD Blah } =""C" "YES" "NO" }}}

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"RC" wrote in message
ps.com...
I cannot find a post that adddressed my issue specifically, most of the
posts similar to this only relates to having 2 options...

Since there is apparently not an easy way to use "OR" statments, I need
to be able to create the following logic in my document:

IF {MERGEFILED Blah } = "A" or "B" or "C" then "YES" else "NO"

Any help would be appreciated. Thanks!

-Rich








  #6   Report Post  
macropod
 
Posts: n/a
Default 3 possibilities for IF

Hi Folks,

You can reduce the number of True/False outputs to one each, quite easily:
{IF{IF{MAILMERGE Field1}= "A" 1 0}*{IF{MAILMERGE Field2}= "B" 1
0}*{IF{MAILMERGE Field3}= "C" 1 0}= 1 "True Text" "False Text"}

Cheers


"computergeek" wrote in message
...
Although that does work well for one word results (Ex. Yes.) It is not
practical for a lenghty result which, if needed to be modified, would have

to
be modified in TWO or THREE places. Also, what if there are more than

three
options in your merge field? I think your example works well if there are
only three variables and you have only short results which never will need

to
be modified. Is there an OR argument, like RC asks? If mergefield = A or B
then "Yes" if not then "No"
See how "yes" only appears once and if the answer is anything between C-Z
you still get the other answer?

"Doug Robbins - Word MVP" wrote:

{ IF {MERGEFIELD Blah } = "A" "Yes" { IF {MERGEFIELD Blah } = "B" "Yes"

{ IF
{MERGEFIELD Blah } =""C" "YES" "NO" }}}

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"RC" wrote in message
ps.com...
I cannot find a post that adddressed my issue specifically, most of the
posts similar to this only relates to having 2 options...

Since there is apparently not an easy way to use "OR" statments, I

need
to be able to create the following logic in my document:

IF {MERGEFILED Blah } = "A" or "B" or "C" then "YES" else "NO"

Any help would be appreciated. Thanks!

-Rich






  #7   Report Post  
Graham Mayor
 
Posts: n/a
Default 3 possibilities for IF

While I agree with Doug here, if you wish to insert longer strings than yes
or no you can save them as autotext entries and insert autotext fields, then
any changes can be made to the autotext entries themselves and so all will
change together. Or you could use SET fields to define your responses in
bookmarks and REF fields to place the results. You can nest up to 20 fields
though admittedly that gets a bit unwieldy The possibilities are many
depending on what is actually required.

--

Graham Mayor - Word MVP

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




computergeek wrote:
Although that does work well for one word results (Ex. Yes.) It is not
practical for a lenghty result which, if needed to be modified, would
have to be modified in TWO or THREE places. Also, what if there are
more than three options in your merge field? I think your example
works well if there are only three variables and you have only short
results which never will need to be modified. Is there an OR
argument, like RC asks? If mergefield = A or B then "Yes" if not then
"No"
See how "yes" only appears once and if the answer is anything between
C-Z you still get the other answer?

"Doug Robbins - Word MVP" wrote:

{ IF {MERGEFIELD Blah } = "A" "Yes" { IF {MERGEFIELD Blah } = "B"
"Yes" { IF {MERGEFIELD Blah } =""C" "YES" "NO" }}}

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"RC" wrote in message
ps.com...
I cannot find a post that adddressed my issue specifically, most of
the posts similar to this only relates to having 2 options...

Since there is apparently not an easy way to use "OR" statments, I
need to be able to create the following logic in my document:

IF {MERGEFILED Blah } = "A" or "B" or "C" then "YES" else "NO"

Any help would be appreciated. Thanks!

-Rich



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:41 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"