Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
3 possibilities for IF
Perfect. Thanks!
-Rich |
#4
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 |