Replace line breaks inside names
Turn a name split over two lines in one cell into Ava Reed.
What you'll make

The formula

| Number | Part | What it does | Result so far |
|---|---|---|---|
| 1 | A8 | The name. ¶ marks a line break. | "Ava¶Reed" |
| 2 | SUBSTITUTE( … CHAR(13) … ) | Swaps a hidden return for a space. | "Ava¶Reed" |
| 3 | SUBSTITUTE( … CHAR(10) … ) | Swaps each line break for a space. | "Ava Reed" |
| 4 | TRIM( … ) | Removes extra spaces, so only one is left. | "Ava Reed" |
Each bracket wraps the one above it, so Excel works from the inside out.
=TRIM(SUBSTITUTE(SUBSTITUTE(A8,CHAR(13)," "),CHAR(10)," "))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 split over two lines into the green column of the Template tab. Each name fills in by itself.
- Move them into your letter. Copy the results. Then use Paste Special and choose Values.
Before you send
Every line is joined into one name. If a cell also holds an address or company, fix those rows by hand.
Route: Get names ready for the letter
Microsoft's help: SUBSTITUTE function



