You need to sign in to do that
Don't have an account?
sudhirn@merunetworks.com
Extract only the first name in email
Hi,
We have a email field which is in firstname.lastname@domain.com format my requrement is to extract only the firstname from email field. please suggest me how to extract.
I tried below method which is returning firstname.lastname
Also when returning firstname can we keep the first letter as capital letter using formula please let me now
Thanks
Sudhir
We have a email field which is in firstname.lastname@domain.com format my requrement is to extract only the firstname from email field. please suggest me how to extract.
I tried below method which is returning firstname.lastname
LEFT( Owner_Email__c,FIND( "@",Owner_Email__c ) - 1 )
Also when returning firstname can we keep the first letter as capital letter using formula please let me now
Thanks
Sudhir
Convert the email field into char array then extract the character which are before ( . )dot. then you will get your first name from this method.
You were almost there!
Try using:
LEFT(Owner_Email__c, FIND( ".", Owner_Email__c ) - 1 )
This gives you the first name from from the email.
To get the capital letter try this:
UPPER(LEFT((LEFT(Owner_Email__c, FIND(".", Owner_Email__c)-1)), 1))&LOWER(RIGHT((LEFT(Owner_Email__c, FIND(".", Owner_Email__c)-1)), Len((LEFT(Owner_Email__c, FIND(".", Owner_Email__c)-1)))-1))
Keith
matt@abc.com if user is having this I need just the name ignorning @abc.com i.e first name
How to add this condition to the exisitng formula code.
Thanks
Sudhir
I have taken a slightly different approach to Tolga:
The first letter of an email address can’t be “.” as detailed here: https://en.wikipedia.org/wiki/Email_address
So I start with: which will return the uppercase value of the first character, with non-Latin characters being returned as they are.
Then I check to see if the local-part of the email (everything before the “@”), minus the 1st character that we are already dealing with, contains a “.” character. If the local-part does contain a “.” (i.e. the condition is TRUE) then I take the string starting at character 2 and finishing with the “.” character and force it to lowercase just in case there are uppercase characters hiding in there. If the local-part does not contain a “.” (i.e. the condition is FALSE) then I take the string starting as character 2 and finishing with the “@” character and force it to lowercase just in case there are uppercase characters hiding in there. So, the complete formula becomes Keith