What you will learn
- Count characters with LEN
- Take the last name with RIGHT
How it works
The last name is LEN(A2) − FIND(" ",A2) characters long.
So =RIGHT(A2,B2-C2) takes the last name, where B2 is the length and C2 is the space position.
Formulas at a glance
=LEN(A2) | length |
=FIND(" ",A2) | space |
=RIGHT(A2,B2-C2) | last name |
Example
Write the formula to count the characters in Maya's name.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Full name | Length | Space at | Last name |
| 2 | Maya Chen | |||
| 3 | Luis Ortega | |||
| 4 | Priya Natarajan | |||
| 5 | Ben Ito |
Click B2 and type =LEN(A2), then press Enter.
The answer is 9.
When to use it
- Splitting full names into last names
- Sorting a list by last name
- Building "Last, First" directories
Common mistakes
- Off by oneLength minus the space position gives exactly the last name.
- Middle namesThis method takes everything after the first space.
- Extra spacesUse TRIM first so the count is right.
Practice it on a real sheet
Reading is a start. Doing it is how it sticks. This lesson walks you through every click on a live spreadsheet and checks each answer.