Remove square brackets around a name

Turn [Ava Reed] into Ava Reed so names print without brackets.

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
1AND( … )True when the name starts with [ and ends with ].TRUE
2TRIM(MID(TRIM(A8),2,LEN(TRIM(A8))-2))Drops the first and last character."Ava Reed"
3TRIM(A8)The name as it is, when the brackets don't match.Not used for row 8
4IF( … )Removes the brackets only when part 1 is true."Ava Reed"

Read it left to right. Only one pair at the very ends comes off.

=IF(AND(LEFT(TRIM(A8),1)="[",RIGHT(TRIM(A8),1)="]",LEN(TRIM(A8))>=2),TRIM(MID(TRIM(A8),2,LEN(TRIM(A8))-2)),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 brackets fill in by themselves.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

A bracket on one side only and brackets inside a name both stay. Check those rows.

Route: Get names ready for the letter

Microsoft's help: MID function