Show two aliases only when they differ
Turn Ava Marie Reed and Ava Reed into Ava Marie Reed / Ava Reed, without repeats.
What you'll make

The formula

| Number | Part | What it does | Result so far |
|---|---|---|---|
| 1 | TRIM(A8)=TRIM(B8) | Checks whether both names are the same. | No match |
| 2 | TRIM(A8) | If they are, shows the primary name once. | Not used for row 8 |
| 3 | TRIM(A8) | The primary name, without stray spaces. | "Ava Marie Reed" |
| 4 | IF(TRIM(B8)…) | Adds / and the alternate name, if there is one. | " / Ava Reed" |
| 5 | IF( … ) | Picks the right result for the row. | "Ava Marie Reed / …" |
Read it left to right. Capitals and extra spaces don't matter in part 1, so ava reed matches Ava Reed.
=IF(TRIM(A8)=TRIM(B8),TRIM(A8),TRIM(A8)&IF(TRIM(B8)="",""," / "&TRIM(B8)))How to use it
Yellow bar at the top? Click Enable Editing.
- See it work. The Example tab shows 20 made-up names with the formula already in.
- Use your own names. Paste primary names into column A of the Template tab and other names into column B. Leave column B empty if there is none.
- Move them into your letter. Copy the results. Then use Paste Special and choose Values.
Before you send
Names only count as the same when they match word for word. Ava Reed and A. Reed both show.
Route: Get names ready for the letter
Microsoft's help: IF function
OTHER ROUTES YOU MIGHT LIKE

Make a label with a masked surname
Ava + Reed → Ava R***
Get the template →
Capitalize given names, keep surnames
AVA + van Dijk → Ava van Dijk
Get the template →
Use an uppercase surname
AVA + Reed → Ava REED
Get the template →
Fix "Dear ," when a first name is blank
(blank) → Dear colleague,
Take this route →