Get the second name line from a cell

Pull Noah Park out of a cell that holds Ava Reed and Noah Park.

What you'll make

In Excel: Ava Reed ¶ Noah Park becomes Noah Park.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1A8Names on separate lines. ¶ marks a line break."Ava Reed¶Noah Park"
2SUBSTITUTE( … ,CHAR(13),"")Removes a hidden return left by some files."Ava Reed¶Noah Park"
3TEXTAFTER( … ,CHAR(10))Drops the first line."Noah Park"
4TEXTBEFORE( … &CHAR(10),CHAR(10))Keeps the second line, drops any later lines."Noah Park"
5IFERROR( … ,"")Shows nothing when there is no second line."Noah Park"

Each bracket wraps the one above it, so Excel works from the inside out. The extra CHAR(10) lets a last line count too.

=IFERROR(TEXTBEFORE(TEXTAFTER(SUBSTITUTE(A8,CHAR(13),""),CHAR(10))&CHAR(10),CHAR(10)),"")

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 cells with one name per line into the green column of the Template tab. Each second name fills in by itself.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

Only the second line comes back. If a cell has an empty second line, the result is blank, so check blank rows by hand.

Route: Get names ready for the letter

Microsoft's help: TEXTAFTER function