Get a chosen name from a semicolon list

Turn Ava Reed;Noah Park;Mia Chen and position 2 into Noah Park.

What you'll make

In Excel: Ava Reed;Noah Park;Mia Chen + 2 becomes Noah Park.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1TEXTAFTER(";"&A8,";",B8)Puts a ; in front, then skips to the chosen name."Noah Park;Mia Chen"
2&";"Adds a ; at the end, so the last name has one."Noah Park;Mia Chen;"
3TEXTBEFORE( … ,";")Keeps what comes before the next ; mark."Noah Park"
4TRIM( … )Removes any spaces left at the ends."Noah Park"
5IFERROR( … ,"")Shows nothing when the position is empty or too big."Noah Park"

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

=IFERROR(TRIM(TEXTBEFORE(TEXTAFTER(";"&A8,";",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 semicolon lists into column A of the Template tab and the position you want into column B. The chosen names fill in by themselves.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

Count positions from 1, starting at the left. A position past the last name leaves the cell blank, so check blank rows.

Route: Get names ready for the letter

Microsoft's help: TEXTAFTER function