Get the Last name from a Name

The following is the generic formula to extract the Last name from a full name, provided the name contains only First and Last Names.

=RIGHT("Full Name",LEN("Full Name")-SEARCH(" ","Full Name"))

Explanation

SEARCH function in the formula will return the position of ” ” (Space character) from the Full name.

In the formula used in the cell C3, SEARCH function will return the position of ” ” (Space character) in the name Christopher Nolan, which is 12.

SEARCH(" ","Christopher Nolan")

The value returned by SEARCH function is then subtracted from the length of the name returned by LEN function.

LEN("Christopher Nolan")-SEARCH(" ","Christopher Nolan"))

The result of this expression is used inside RIGHT function to return the last name.

RIGHT("Christopher Nolan",5)

Excel Formulas

Excel Functions

Uncategorized