Separate a name from an em-dash role

Turn Ava Reed — Treasurer into Ava Reed for greetings and labels.

What you'll make

In Excel: Ava Reed — Treasurer becomes Ava Reed.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1TEXTBEFORE(A8," — ")Takes what comes before a space, long dash —, space."Ava Reed"
2TRIM( … )Removes any spaces left at the ends."Ava Reed"
3TRIM(A8)With no long dash, keeps the whole cell.Not used for row 8
4IFERROR( … )Uses part 3 when there is no long dash."Ava Reed"

Each bracket wraps the one above it, so Excel works from the inside out.

=IFERROR(TRIM(TEXTBEFORE(A8," — ")),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 with roles into the green column of the Template tab. Each name fills in by itself.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

Only a space, long dash —, space splits the cell. A short hyphen like Ava Reed - Treasurer stays whole, so check those by hand.

Route: Get names ready for the letter

Microsoft's help: TEXTBEFORE function