You need to sign in to do that
Don't have an account?

Help Splitting up Full Name field into First Name and Last Name
Hello
I have a field where a Full Name is entered - I need to split this into a First Name field and a Last Name field
I have created the fields - I need help on the formula
In many cases there are 4 entries
John abott-gacey
Mary Smith-Felch
Sam M. Wall
Thanks
Okay for that you're gonna need to create a set of formulas that use a combination of FIND, MID, LEFT, RIGHT functions to parse out the different elements of the Name Field.
Here's some more info on those functions to help get you started ->
https://na2.salesforce.com/help/doc/en/salesforce_formulas_cheatsheet.pdf
https://na2.salesforce.com/help/doc/en/salesforce_useful_formula_fields.pdf
Thanks - Disarm the settlers!
Do you have any suggestions / examples of an actual formula that can work
I have played around with a nested If statement - it has limitations I cant break through - it works fine for the first name
This is what I have - for first name
LEFT( Name ,
if ( begins( mid( Name,2,1) ," "),1,
if ( begins( mid( Name,3,1) ," "),2,
if ( begins( mid( Name,4,1) ," "),3,
if ( begins( mid( Name,5,1) ," "),4,
if ( begins( mid( Name,6,1) ," "),5,
if ( begins( mid( Name,7,1) ," "),6,
if ( begins( mid( Name,8,1) ," "),7,
if ( begins( mid( Name,9,1) ," "),8,
if ( begins( mid( Name,10,1) ," "),9,
if ( begins( mid( Name,11,1) ," "),10,
if ( begins( mid( Name,12,1) ," "),11,
12
))))))))))))
the last name I need help!
LOL!!!
Lemme see what I can dig up, I might have a parse formula that I can cannibalize.
PS. I'm waiting for Sunday, four days after Wednesday...
Thanks!
Btw - was at the NYEve show in NYC - classic
On the "GBV Classic Lineup" reunion tour this past year? The Boston Show was sold out before tickets even went on sale. Seriously, the box office had none but people were already selling them on EBay and StubHub for 10X Face Value.
I have seen Tobin Sprout on his own a few times (and GBV probably about a dozen or more).
Anyway, still digging through me archives looking for that WFR (I've literally got TONS of them on my Developer SFDC Org)
Hey
Toby is the best! The classic line up was amazing - we had to suck it up and get the tcks on stub hub - man the show was similar to a religous experience - i have never hugged and hi-fived so many strangers in my life!
Thanks again for the efforts
I think I may have found some of that Name Parsing Code, just have to make sure I have the right ones.
Okay, I was able to fine some of them.
First Name.
Middle Initial
Last name (still looking)
The club is open!!!
many thanks for this! These work perfectly
Anything you find on the last name is greatly appreciated!
The Club is definitely Open!
Thanks
Hey SteveMo!
I have a scenario and am wondering if/how your splitting solution could be applied.
I've created a new Create Contact button on the Account.
It creates the Contact and passes 6 pieces of data from the Account to the new Contact Record.
2nd Business Owner's Name field is text (50). I need this field to split into First Name and Last Name fields. It also needs to take into consideration hyphenated names or multiple names (i.e., Sun Ye Linn)
Is your splitting formula the right solution AND is this part of a field update WFR?
And, just in case no one has told you today... YOU ARE THE BEST!
jy
Hey Steve,
Looking for a slightly different spin on this.
I've got an email template that truncates the supplied name on cases so the user gets "Dear Steve" instead of "Dear Steve Mo."
Except of course there's our double first name user eg "Mary Ann" vs simply "Ginger" (That's a whole other formula, sorry to digress.)
Aaaaaanyway, I could customise the formula for her with Contains Mary Ann, but I'd rather figure out something that would work for all future two namers.
Fisrt name formula works fine: LEFT(SuppliedName, Find(" ",SuppliedName))
But I'm having trouble wrapping my head around using find to get the second space and parse out the middle name.
Any help appreciated.
Best,
AFB
P.S. You can blame the button click admins for my seeking you out for this. Thanks.
Hi, by using that as a formula field we only get middle name initial...
iam trying to to get full middle name??????? how??
will u please solve my issue
RIGHT(nameField,LEN(nameField)-FIND(" ",nameField))
Hope this helps everyone!
Last name is not working as its pulling the middle name and I don't want that. This is what I am using for last name: RIGHT( Billing_Contact_Name2__c ,LEN(Billing_Contact_Name2__c)-FIND(" ",Billing_Contact_Name2__c))
Thanks In Advance!
Sarah
condition: for custom object, we need to have lookup relationship for Account.
if you need Account first Name and Last Name as seperate fields to any object, you can do as below: In custom object --> create a formula field --> return type as Text --> enter a formula as --> Account.FirstName. save it. For Last Name: enter a formula as --> Account.LastName. hope this works.
=RIGHT(B3,LEN(B3)-FIND("*",SUBSTITUTE(B3," ","*",LEN(B3)-LEN(SUBSTITUTE(B3," ","")))))
Looks for the number of spaces and uses that for the last space in the full name.
That last space then gets substitued with a *. After that * you will find the last name.