Get first name field using a separator
Turn Ava|Reed into Ava, 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 | TEXTBEFORE(A8,B8) | Takes what comes before the first separator. | "Ava" |
| 2 | TRIM( … ) | Removes any spaces left at the ends. | "Ava" |
| 3 | TRIM(A8) | With no separator, keeps the whole cell. | Not used for row 8 |
| 4 | IFERROR( … ) | Uses part 3 when there is no separator. | "Ava" |
Each bracket wraps the one above it, so Excel works from the inside out.
=IFERROR(TRIM(TEXTBEFORE(A8,B8)),TRIM(A8))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 names into column A of the Template tab and their separator into column B. First fields fill in by themselves.
- Move them into your letter. Copy the results. Then use Paste Special and choose Values.
Before you send
Type the separator exactly as it is in the cell, with no extra spaces. If it isn't found, the whole cell is kept.
Route: Get names ready for the letter
Microsoft's help: TEXTBEFORE function
OTHER ROUTES YOU MIGHT LIKE

Get a chosen name from a semicolon list
Ava Reed;Noah Park;Mia Chen + 2 → Noah Park
Get the template →
Change a comma suffix to a space suffix
Ava Reed, Jr. → Ava Reed Jr.
Get the template →
Get the second name line from a cell
Ava Reed ¶ Noah Park → Noah Park
Get the template →
Fix "Dear ," when a first name is blank
(blank) → Dear colleague,
Take this route →