Get the name between two separators
Pull Ava Reed out of 0042|Ava Reed|Active, with the separator you choose in column B.
Download Excel templateMicrosoft 365
What you'll make

The formula

| Number | Part | What it does | Result so far |
|---|---|---|---|
| 1 | A8 | The export record, with fields split by a separator. | "0042|Ava Reed|Active" |
| 2 | TEXTAFTER( … ,B8) | Drops everything up to the first separator. | "Ava Reed|Active" |
| 3 | TEXTBEFORE( … ,B8) | Keeps what comes before the next separator. | "Ava Reed" |
| 4 | TRIM( … ) | Removes any spaces left at the ends. | "Ava Reed" |
| 5 | IFERROR( … ,"") | Shows nothing when there is no second separator. | "Ava Reed" |
Each bracket wraps the one above it, so Excel works from the inside out.
=IFERROR(TRIM(TEXTBEFORE(TEXTAFTER(A8,B8),B8)),"")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 export records into column A of the Template tab and their separator into column B. Names fill in by themselves.
- Move them into your letter. Copy the results. Then use Paste Special and choose Values.
Before you send
The name must be the second field. If a field has the separator inside quotes, the name comes out cut short, so check those rows.
Route: Get names ready for the letter
Microsoft's help: TEXTBEFORE function
OTHER ROUTES YOU MIGHT LIKE

Combine names from labeled records
First=Ava;Last=Reed → Ava Reed
Get the template →
Get the name after a chosen separator
Active|Ava Reed + | → Ava Reed
Get the template →
Remove an import code before a name
0042Ava Reed + 4 characters → Ava Reed
Get the template →
Fix "Dear ," when a first name is blank
(blank) → Dear colleague,
Take this route →