Fix spaces around commas in names
Turn Reed ,Ava into Reed, Ava so Last, First names look right.
What you'll make

The formula

| Number | Part | What it does | Result so far |
|---|---|---|---|
| 1 | A8 | The name with a badly spaced comma. | "Reed ,Ava" |
| 2 | TRIM( … ) | Removes extra spaces, leaving single ones. | "Reed ,Ava" |
| 3 | SUBSTITUTE( … " ," … ) | Removes the space before the comma. | "Reed,Ava" |
| 4 | SUBSTITUTE( … "," … ) | Puts a space after each comma. | "Reed, Ava" |
| 5 | TRIM( … ) | Shrinks any doubled spaces back to one. | "Reed, Ava" |
Each bracket wraps the one above it, so Excel works from the inside out.
=TRIM(SUBSTITUTE(SUBSTITUTE(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 Last, First 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
Extra or trailing commas stay, like Reed, Ava, so check rows with more than one comma.
Route: Get names ready for the letter
Microsoft's help: SUBSTITUTE function
OTHER ROUTES YOU MIGHT LIKE

Replace a name placeholder with a blank
N/A + N/A → blank
Get the template →
Remove all spaces from a single name
O’ Neill → O’Neill
Get the template →
Apply a known capitalization exception
van dijk + van Dijk → van Dijk
Get the template →
Fix "Dear ," when a first name is blank
(blank) → Dear colleague,
Take this route →