This document demonstrates two methods for extracting last names from full names using Excel formulas. The first method uses TRIM, RIGHT, SUBSTITUTE, REPT and LEN functions to extract the last name by substituting spaces with repeated spaces and taking the rightmost part. The second method uses the TEXTAFTER function to extract the last name by finding the text after the last space.
This document demonstrates two methods for extracting last names from full names using Excel formulas. The first method uses TRIM, RIGHT, SUBSTITUTE, REPT and LEN functions to extract the last name by substituting spaces with repeated spaces and taking the rightmost part. The second method uses the TEXTAFTER function to extract the last name by finding the text after the last space.
This document demonstrates two methods for extracting last names from full names using Excel formulas. The first method uses TRIM, RIGHT, SUBSTITUTE, REPT and LEN functions to extract the last name by substituting spaces with repeated spaces and taking the rightmost part. The second method uses the TEXTAFTER function to extract the last name by finding the text after the last space.
USING TRIM, RIGHT, SUBSTITUTE, REPT and LEN Rachel Hall Hall =TRIM(RIGHT(SUBSTITUTE(A4," ",REPT(" ",LEN(A4))),LEN(A4))) Esther Roberts Smith Smith =TRIM(RIGHT(SUBSTITUTE(A5," ",REPT(" ",LEN(A5))),LEN(A5))) Donald Donald =TRIM(RIGHT(SUBSTITUTE(A6," ",REPT(" ",LEN(A6))),LEN(A6))) =TRIM(RIGHT(SUBSTITUTE(A7," ",REPT(" ",LEN(A7))),LEN(A7))) Brian Thompson Kim Reed Reed =TRIM(RIGHT(SUBSTITUTE(A8," ",REPT(" ",LEN(A8))),LEN(A8))) USING TEXTAFTER Rachel Hall Hall =_xlfn.textafter(" "&A10," ",-1) Esther Roberts Smith Smith =_xlfn.textafter(" "&A11," ",-1) Donald Donald =_xlfn.textafter(" "&A12," ",-1) #NAME? =_xlfn.textafter(" "&A13," ",-1) Brian Thompson Kim Reed Reed =_xlfn.textafter(" "&A14," ",-1)