# Get last name from name with comma

If you need extract the last name from a full name in LAST, FIRST format, you can do so with a formula that uses the LEFT and FIND functions. The formula works with names in this format, where a comma and space separate the last name from the first name:

LAST, FIRST

Jones, Sarah

Smith, Jim

Doe, Jane

In the example, the active cell contains this formula:

At a high level, this formula uses LEFT to extract characters from the left side of the name. To figure out the number of characters that need to be extracted to get the last name, the formula uses the FIND function to locate the position of ", " in the name:

FIND(", ",B4) // position of comma

The comma is actually one character beyond the end of the last name, so, to get the true length of the last name, 1 must be subtracted:

FIND(", ",B4)-1 // length of the last name

Because the name is in reverse order (LAST, FIRST), the LEFT function can simply extract the last name directly from the left.

For the example, the name is "Chang, Amy", the position of the comma is 6. So the formula simplifies to this:

6 - 1 = 5 // length of last name

Then:

LEFT("Chang, Amy",5) // "Chang"

Note: this formula will only work with names in Last, First format, separated with a comma and space.

## Excel Formula Training

Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.

## Download 100+ Important Excel Functions

Get over 100 Excel Functions you should know in one handy PDF.