Replace HTML br tags in names
Turn Ava<br>Reed, copied from a web page, into Ava Reed.
What you'll make

The formula

| Number | Part | What it does | Result so far |
|---|---|---|---|
| 1 | A8 | The name, with web code where the space should be. | "Ava<br>Reed" |
| 2 | SUBSTITUTE( … "<br>" … ) | Swaps each <br> for a space. | "Ava Reed" |
| 3 | SUBSTITUTE( … "<br/>" … ) | Swaps each <br/> for a space. | "Ava Reed" |
| 4 | SUBSTITUTE( … "<br />" … ) | Swaps each <br /> for a space. | "Ava Reed" |
| 5 | 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(SUBSTITUTE(A8,"<br>"," "),"<br/>"," "),"<br />"," "))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 the green column of the Template tab. Clean names fill in by themselves.
- Move them into your letter. Copy the results. Then use Paste Special and choose Values.
Before you send
Only lowercase <br>, <br/> and <br /> are fixed. Other web code, or a cell with several people, stays as it is. Check those rows by hand.
Route: Get names ready for the letter
Microsoft's help: SUBSTITUTE function
OTHER ROUTES YOU MIGHT LIKE

Fix backslash quotes in imported names
Ava \"Avie\" Reed → Ava "Avie" Reed
Get the template →
Replace line and paragraph separators
Ava [line separator] Reed → Ava Reed
Get the template →
Replace thin and hair spaces in names
Ava [thin space] Reed → Ava Reed
Get the template →
Fix "Dear ," when a first name is blank
(blank) → Dear colleague,
Take this route →