Replace nonbreaking spaces in names

Fix the hidden spaces that TRIM can't remove.

What you'll make

In Excel: Removes the hidden spaces TRIM misses.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesFor row 8
1A8The name from your export. Each · is a hidden space."·Ava··Reed·"
2UNICHAR(160)The nonbreaking space. It looks like a space, but TRIM can't see it.·
3" "An ordinary space." "
4SUBSTITUTE( … )Swaps every hidden space for an ordinary one." Ava Reed "
5TRIM( … )Removes the extra ordinary spaces."Ava Reed"

SUBSTITUTE works first, then TRIM tidies up.

=TRIM(SUBSTITUTE(A8,UNICHAR(160)," "))

How to use it

Yellow bar at the top? Click Enable Editing.

  1. See it work. The Example tab shows 20 made-up names with the formula already in.
  2. Use your own names. Paste names into the green column of the Template tab. Clean names fill in by themselves.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

This fixes nonbreaking spaces only. Tabs, line breaks and other odd characters need a different fix. Check the names before you send.

Route: Get names ready for the letter

Microsoft's help: TRIM function