Remove a trailing comma from a name

Turn Ava Reed, into Ava Reed so names end cleanly.

What you'll make

In Excel: Ava Reed, becomes Ava Reed.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1RIGHT(TRIM(A8),1)=","True when the name ends with a comma.TRUE
2TRIM(LEFT(TRIM(A8),LEN(TRIM(A8))-1))Keeps everything except the last character."Ava Reed"
3TRIM(A8)The name as it is, when there is no end comma.Not used for row 8
4IF( … )Removes the comma only when part 1 is true."Ava Reed"

Read it left to right. Commas inside a name stay. Only one comma at the end comes off.

=IF(RIGHT(TRIM(A8),1)=",",TRIM(LEFT(TRIM(A8),LEN(TRIM(A8))-1)),TRIM(A8))

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. Names without the end comma fill in by themselves.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

A name ending in two commas keeps one. Paste the results back in to remove the next one.

Route: Get names ready for the letter

Microsoft's help: RIGHT function