Join up to three names with a final and

Turn Ava, Noah and Mia into one line for cards and invitations.

What you'll make

In Excel: Ava + Noah + Mia becomes Ava, Noah and Mia.

The formula

The formula, with a numbered bracket under each part.
NumberPartWhat it doesResult so far
1TRIM(A8)The first name, without stray spaces."Ava"
2IF(TRIM(B8)…)Adds the second name after a comma, or after and."Ava, Noah"
3IF(TRIM(C8)…)Adds and with the third name, if there is one."Ava, Noah and Mia"

Read it left to right. Part 2 uses and when there is no third name. No comma goes before and.

=TRIM(A8)&IF(TRIM(B8)="","",IF(TRIM(C8)=""," and ",", ")&TRIM(B8))&IF(TRIM(C8)="",""," and "&TRIM(C8))

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 up to three names into the green columns of the Template tab. Leave the last ones empty for fewer names.
  3. Move them into your letter. Copy the results. Then use Paste Special and choose Values.

Before you send

Names are joined in the order of the columns. Check the order before you send.

Route: Get names ready for the letter

Microsoft's help: IF function