View Single Post
 
Old 06-05-2019, 03:41 PM
SCOATS SCOATS is offline Windows 10 Office 2013
Novice
 
Join Date: Jun 2019
Posts: 2
SCOATS is on a distinguished road
Default Multiple Conditional formating within MS Mail Merge from Excel

I have a Word template document which has been giving me headaches. The problem is that the software that downloads a list of names, addresses, etc., doesn't combine name formats. I have attached a sample of the Excel spreadsheet. The fields that I need are are follows and explained:

Prefix - Primary Donor Prefix
Gname - Primary Donor First Name
LName - Primary Donor Last Name
Suffix - Primary Donor Suffix
Sprefix - Spouse Donor Prefix
SGname - Spouse Name
SLName - Spouse Last Name

Desig By
P - Single Membership
B - Joint Membership

PGender
M=Male
F=Female

Since some primary members are female, it complicates the merge somewhat.

So, if their membership is single, I just want their primary prefix, name, etc..."Mr. John Doe" and it doesn't matter what their gender is; however, if the primary donor = PGender Female (F) and have joint membership (B) then it must read: "Mrs. Jane and Mr. John Doe".

This used to be run through Access, then Excel, so we are trying to streamline the process of this mail merge. The coding in Access is not working in Word; however, it may be that I am not nesting it properly: =UCase((IIf(IsNull([PREFIX]),[GNAME] & " " & [MIDDLE_NAME] & " " & [LNAME] & [SUFFIX],(IIf([PGENDER]='M' And [DESIG BY]='B',[PREFIX] & ' and ' & [SPREFIX] & ' ' & [GNAME] & " " & [MIDDLE_NAME] & " " & [LNAME],[PREFIX] & ' ' & [GNAME] & ' ' & [MIDDLE_NAME] & " " & [LNAME])))))

Any help would be very much appreciated.

Thank you!!!
Attached Files
File Type: xlsx Mail Merge Data List Sample.xlsx (8.9 KB, 6 views)
Reply With Quote