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

In Excel: Ava Marie Reed + Ava Reed becomes Ava Marie Reed / Ava Reed.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1TRIM(A8)=TRIM(B8)Checks whether both names are the same.No match
2TRIM(A8)If they are, shows the primary name once.Not used for row 8
3TRIM(A8)The primary name, without stray spaces."Ava Marie Reed"
4IF(TRIM(B8)…)Adds / and the alternate name, if there is one." / Ava Reed"
5IF( … )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.

  1. See it work. The Example tab shows 20 made-up names with the formula already in.
  2. 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.
  3. 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