Get middle names from Last, First

Pull Marie Anne out of Reed, Ava Marie Anne, so each name has its own column.

What you'll make

In Excel: Reed, Ava Marie Anne becomes Marie Anne.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1TEXTAFTER(A8,",")Takes what comes after the comma." Ava Marie"
2TRIM( … )Trims the space off the front."Ava Marie"
3TEXTAFTER( … ," ")Drops the first word, the first name."Marie"
4TRIM( … )Removes any spaces left at the ends."Marie"
5IFERROR( … ,"")Shows nothing when there is no comma or middle name."Marie"

Each bracket wraps the one above it, so Excel works from the inside out.

=IFERROR(TRIM(TEXTAFTER(TRIM(TEXTAFTER(A8,","))," ")),"")

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 Last, First Middle names into the green column of the Template tab. Middle names fill in by themselves.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

Only the first word after the comma counts as the first name. Mary Ann Lee would give Ann Lee, so check two-word first names by hand.

Route: Get names ready for the letter

Microsoft's help: TEXTAFTER function