![]() |
|
|
|
#1
|
||||
|
||||
|
Are the braces (i.e. {}) in your attachment present in the actual workbook you're using for the mailmerge?
As for: If {Rep} <> "" And {Rep} has data that's the same as: If {Rep} <> "" since <> "" means there must be data whenever the test evaluates to TRUE...
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#2
|
|||
|
|||
|
Thanks for responding.
Let me clarify a few things in my previous post. If {Field Rep} = "" AND if {Field Role} = Rec\Rpt\Ord OR Rec\Rpt OR Rpt\Ord OR Ord OR Rec then insert {Field Address} else {AltAdd}. The above is not the code I used, it only represents what I “want” to use to accomplish something. “Rep” is the field that has a name OR it is left blank. So if that field is not left blank and if the next field called “Role” has any of the names underlined, then the result would merge from the “Address” field. So it’s a search of the field called Role. If any of the underlined is found, then whatever is in the Address merges ELSE Altname and AltAdd merges. So, below is the actual code I tried using {IF{= OR ({ COMPARE {Field Rep} = Rec\Rpt\Ord}, {COMPARE {Field Rep} = Rec\Rpt}, {COMPARE {Field Rep} = Rpt\Ord},{ COMPARE {Field Rep} = Ord}, { COMPARE {Field Rep} = Rec }) {Rep} {Address}" " {Altname} {AltAdd}"} Yes, I used the brackets which I thought is used if I am using OR to accomplish my goal. The excel only shows what my data choices could be but I am using Word 2016. I “hope” I did not confuse you. |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Combine "sort within groups" and "identify duplicate/unique values" in two different variables. | civilcervant | Excel | 3 | 06-12-2017 07:27 AM |
| Need help with conditional formatting & returning "Pass" / "Fail Results" in a Column N | mikey386 | Excel | 2 | 12-11-2014 01:14 PM |
| remove repeated words with " macro " or " wild cards " in texts with parentheses and commas | jocke321 | Word VBA | 2 | 12-10-2014 11:27 AM |
IF statement just generates text "MERGEFIELD" in document - what am I doing wrong?
|
Eri | Mail Merge | 1 | 03-03-2012 03:03 PM |
How to choose a "List" for certain "Heading" from "Modify" tool?
|
Jamal NUMAN | Word | 2 | 07-03-2011 03:11 AM |