How to make a wedding guest list in Excel

The list has four names. The first cell is stored with extra spaces, Maria Lopez. TRIM makes that Maria Lopez. The other three are Maria Elena Lopez, Madonna, and Lopez, Maria.

The workbook with those names, the ZIP text, and the seat counts is the wedding guest list. The replies, the meals, and the table numbers are made up.

The first word and the rest

xl.split.name spills the given name and the rest in Microsoft 365. Excel 2010 does the same cut with FIND, LEFT, and MID. How to split first and last names in Excel walks the same four names, including the TEXTBEFORE form that Excel 2021 cannot calculate.

FIND
=IF(ISERROR(FIND(" ",A2)),A2,LEFT(A2,FIND(" ",A2)-1))
=IF(ISERROR(FIND(" ",A3)),A3,LEFT(A3,FIND(" ",A3)-1))B3
First word, Excel 2010
ABC
1Clean nameGivenRest
2Maria LopezMariaLopez
3Maria Elena LopezMariaElena Lopez
4MadonnaMadonna
A picture after TRIM. Maria Elena Lopez starts with Maria. The rest is Elena Lopez. Madonna has no space, so the given name is Madonna and the rest is blank.
=IF(ISERROR(FIND(" ", "Maria Elena Lopez")), "Maria Elena Lopez", LEFT("Maria Elena Lopez", FIND(" ", "Maria Elena Lopez")-1))
=MID("Maria Elena Lopez", FIND(" ", "Maria Elena Lopez")+1, LEN("Maria Elena Lopez"))

The given name is Maria. The rest is Elena Lopez. Madonna has no space, so FIND errors and the given name stays Madonna. The rest is blank.

Lopez, Maria is already last-name first. The first word is Lopez, with the comma. The sheet does not swap it.

The place card is the last word

The last word is not the rest of the name once someone has a middle name. Maria Elena Lopez ends in Lopez. The rest of that name is Elena Lopez, which is not the word Lopez.

COUNTIF
=COUNTIF(D2:D5,"Lopez")
=COUNTIF(B2:B5,"Lopez")B6
Last word
AB
1Clean nameLast word
2Maria LopezLopez
3Maria Elena LopezLopez
4MadonnaMadonna
5Lopez, MariaMaria
6Count of Lopez2
A picture of the place-card column. Maria Lopez and Maria Elena Lopez both end in Lopez. Madonna stays Madonna. Lopez, Maria ends in Maria, because the given name is last.

COUNTIF of the last-word column for Lopez is 2. COUNTIF of the rest column for the exact word Lopez is 1, because only Maria Lopez has a rest that is exactly Lopez. xl.proper.name is the Microsoft 365 way to tidy capitals. The sheet uses PROPER after TRIM, which Excel 2010 already has. These four samples are already in that shape once the spaces are gone.

The ZIP has to be text

A CSV turned 02134 into the number 2134. How to keep leading zeros in ZIP codes in Excel shows why a 00000 format only paints the zero. The mailing column uses TEXT.

TEXT
=RIGHT("00000"&TEXT(B2,"0"),5)
02134-1234B3
The Boston ZIP
AB
1ImportedMailed
2213402134
302134-123402134-1234
47870178701
A picture of the imported number. 2134 is what a CSV made from 02134. The mailing cell is the text 02134. 02134-1234 is already text. 78701 needs no extra zero.
=RIGHT("00000"&TEXT(2134, "0"), 5)

That is the text 02134. xl.pad.zip returns the same text in Microsoft 365. xl.is.zip then accepts 02134 and 02134-1234, and it rejects the four-digit number 2134 before the pad. The sheet keeps 02134-1234 as typed, because that cell is already text. Madonna’s 78701 stays 78701.

Who is coming

SUMIFS adds the party size where the reply is Yes. Maria Lopez’s party is 2. Maria Elena Lopez’s party is 1. That is 3 seats, and both of those rows are table 4, so table 4 is also 3. Madonna’s reply is No, one seat. Lopez, Maria is still waiting, one seat. Four names, five seats invited.

COUNTIFS is the same test when you want a count of rows instead of a sum of seats. Two rows replied Yes. One replied No. One is waiting.


Template for this article

Wedding Guest List

More from the blog