Skip to main content

Hi, I’m setting up a very basic mail merge database for a real estate agent, and I’m struggling to figure out the simplest way to deal with (fairly common) instances where a property has two or more owners with different surnames.



How do I design the relevant fields so that a mail merge can format both the envelope and Dear *** in the letter just as elegantly for a John Smith and Betty Johnston customer record as for John and Betty Smith?

Hey @Rowan_Pettett



Welcome to the Airtable community. Sounds like an interesting project!



Here’s what you need to do:



Add an Addressee and a Salutation field in your Contacts table -



You may already have this with Full Name and First Name fields.



Then, you need to link this table to another table.



In this example:



Contacts table


Listings table (real estate)





  • Link the Contacts table to the Listings table


  • Add a Lookup field to the Listings table that looks up the Full Name and First Name


  • Add a Formula field with this formula -




ARRAYJOIN({YourAddresseeLookupField}, " and ")



This formula will join multiple record addressees, add a couple of spaces, and the word “and”





Link both Contacts to a Listing record





You can do this same setup using the First Name field to combine the first names.




And just realizing I didn’t answer the part combining couple’s names with only 1 last name!



Let me think about that one!


And just realizing I didn’t answer the part combining couple’s names with only 1 last name!



Let me think about that one!


Thanks so much Hannah! At least I can make a start with what you’ve suggested.


Thanks so much Hannah! At least I can make a start with what you’ve suggested.


Hi @Rowan_Pettett and @Hannah_Wiginton,



If you have separate fields for first and last names, could use use an “if” statement to check? I’ve set up a base where I used this formula to look for the same or different surnames and it seems to work, and also let you know if there isn’t a surname.





A link to the base and the formula is below. I can also help set it up if you need.









IF(COUNTA(ARRAYUNIQUE({Last Name}))=2,


ARRAYJOIN({Names}," and “),


IF(AND(COUNTA(ARRAYUNIQUE({Last Name}))=1,COUNTA({First Name})=2),


ARRAYJOIN({First Name},” and “)&” “&{Array Unique (Last Name)},


IF(AND(COUNTA(ARRAYUNIQUE({Last Name}))=1,COUNTA({First Name})=1),


{First Name}&” "&{Last Name},


⚠ Check Names ⚠


)


)


)





Thanks,


Chris


Hi @Rowan_Pettett and @Hannah_Wiginton,



If you have separate fields for first and last names, could use use an “if” statement to check? I’ve set up a base where I used this formula to look for the same or different surnames and it seems to work, and also let you know if there isn’t a surname.





A link to the base and the formula is below. I can also help set it up if you need.









IF(COUNTA(ARRAYUNIQUE({Last Name}))=2,


ARRAYJOIN({Names}," and “),


IF(AND(COUNTA(ARRAYUNIQUE({Last Name}))=1,COUNTA({First Name})=2),


ARRAYJOIN({First Name},” and “)&” “&{Array Unique (Last Name)},


IF(AND(COUNTA(ARRAYUNIQUE({Last Name}))=1,COUNTA({First Name})=1),


{First Name}&” "&{Last Name},


⚠ Check Names ⚠


)


)


)





Thanks,


Chris




Awesome, @Williams_Innovations! That looks nice.


Reply