Put a known compound surname first

Turn Mary Ann de la Cruz into de la Cruz, Mary Ann, using the surname you already have.

What you'll make

In Excel: Nia van Dijk + van Dijk becomes van Dijk, Nia.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1RIGHT(TRIM(A8),LEN(TRIM(B8))+1)The end of the full name, as long as part 2." Reed"
2" "&TRIM(B8)The surname with a space before it." Reed"
3TRIM(B8)&", "&LEFT( … )The surname, a comma, then the given names."Reed, Ava"
4"Review name"Shown when the end doesn't match.Not used for row 8
5IF( … )Moves the surname first only when parts 1 and 2 match."Reed, Ava"

Read it left to right. Part 3 includes the comma and space. Capitals don't matter when parts 1 and 2 are compared.

=IF(RIGHT(TRIM(A8),LEN(TRIM(B8))+1)=" "&TRIM(B8),TRIM(B8)&", "&LEFT(TRIM(A8),LEN(TRIM(A8))-LEN(TRIM(B8))-1),"Review name")

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 full names and the surnames you know into the green columns of the Template tab. The surname-first names fill in by themselves.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

The surname comes out exactly as you typed it, so check its capitals. Type all of it, like de la Cruz.

Route: Get names ready for the letter

Microsoft's help: RIGHT function