Print this page

How Can I extract separate First and Last Names from a text field containing Full Name?

Knowledge Article Number 000003201
Description

How can extract first and last name values, or both segments of any other two-part string like street number and street name into separate fields/values?

 

Resolution

To separately extract first and last name values, or both segments of any other two-part string like street number and street name use the following formulas in 2 separate Formula (text data type) fields

First Name:

LEFT(FirstLastName__c,FIND(" ", FirstLastName__c))

Last Name:

RIGHT(FirstLastName__c, LEN(FirstLastName__c) - FIND(" ", FirstLastName__c))

Assuming there is a space between First and Last names (or any other two-part string) the formulas are based on all characters to the left of the space, and all characters to the right of the space, respectively.





promote demote