Get middle names from a full name
Pull Marie out of Ava Marie Reed, so each name has its own column.
Download Excel templateMicrosoft 365
What you'll make

The formula

| Number | Part | What it does | Result so far |
|---|---|---|---|
| 1 | TRIM(A8) | The full name, without stray spaces. | "Ava Marie Reed" |
| 2 | TEXTAFTER( … ," ") | Drops the first word, the first name. | "Marie Reed" |
| 3 | TEXTBEFORE( … ," ",-1) | Drops the last word, the last name. | "Marie" |
| 4 | TRIM( … ) | Removes any spaces left at the ends. | "Marie" |
| 5 | IFERROR( … ,"") | Shows nothing when there is no middle name. | "Marie" |
Each bracket wraps the one above it, so Excel works from the inside out. The -1 means the last space.
=IFERROR(TRIM(TEXTBEFORE(TEXTAFTER(TRIM(A8)," ")," ",-1)),"")How to use it
Yellow bar at the top? Click Enable Editing.
- See it work. The Example tab shows 20 made-up names with the formula already in.
- Use your own names. Paste full names into the green column of the Template tab. Middle names fill in by themselves.
- Move them into your letter. Copy the results. Then use Paste Special and choose Values.
Before you send
The first word counts as the first name and the last word as the last name. Mary Ann de la Cruz would give Ann de la, so check longer names by hand.
Route: Get names ready for the letter
Microsoft's help: TEXTBEFORE function
OTHER ROUTES YOU MIGHT LIKE

Keep first and last names, drop middles
Ava Marie Reed → Ava Reed
Get the template →
Get first name from Last, First Middle
Reed, Ava Marie → Ava
Get the template →
Get middle names from Last, First
Reed, Ava Marie Anne → Marie Anne
Get the template →
Fix "Dear ," when a first name is blank
(blank) → Dear colleague,
Take this route →