Decode HTML apostrophes in names
Turn Zoë O'Neill, copied from a web page, into Zoë O'Neill.
What you'll make

The formula

| Number | Part | What it does | Result so far |
|---|---|---|---|
| 1 | A8 | The name, maybe with web code for an apostrophe. | "Ava Reed" |
| 2 | SUBSTITUTE( … "'" … ) | Swaps each ' for an apostrophe. | "Ava Reed" |
| 3 | SUBSTITUTE( … "'" … ) | Swaps each ' for an apostrophe too. | "Ava Reed" |
Each bracket wraps the one above it, so Excel works from the inside out. Names with no web code stay the same.
=SUBSTITUTE(SUBSTITUTE(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 the green column of the Template tab. Fixed names fill in by themselves.
- Move them into your letter. Copy the results. Then use Paste Special and choose Values.
Before you send
Only ' and lowercase ' are fixed. Other web codes, like &, stay as they are. Check those rows by hand.
Route: Get names ready for the letter
Microsoft's help: SUBSTITUTE function
OTHER ROUTES YOU MIGHT LIKE

Remove a trailing comma from a name
Ava Reed, → Ava Reed
Get the template →
Remove a leading bullet from a name
• Ava Reed → Ava Reed
Get the template →
Use the first available name
blank + Ava Reed + A. Reed → Ava Reed
Get the template →
Fix "Dear ," when a first name is blank
(blank) → Dear colleague,
Take this route →