Get last name from Last, First

An excel formula to get last name from last, first

Related Functions

Sponsored Link

 Get last name from Last, First
=LEFT(name,FIND(", ",name)-1)

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:

 
=LEFT(B4,FIND(", ",B4)-1)

Here's how the formula works:

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.

Sponsored Link

0 votes. 0 / 5