Reputation: 9677
I have a column made up of emails. MOst of these are in the following format:
[email protected]
Is there any way I can extract the 'name' and populate column 2, and extract 'surname' and populate column 3 using an excel formula?
So the columns would read:
[email protected] name surname
Any help is much appreciated.
Cheers
Upvotes: 1
Views: 5275
Reputation: 1
Enter the first Row with the expected results, then Press CTRL+E boom! You're done (Flash Fill)
Upvotes: 0
Reputation: 160
Considering the format is [email protected], the first row is your header row and you need the first and last name in proper format, here's the formula
=PROPER(MID(A2,1,FIND(".",A2)-1))
=PROPER(MID(A2,FIND(".",A2)+1,FIND("@",A2)-FIND(".",A2)-1))
Assuming your email id is in A2 and the First Name and Last Name needs to be extracted in B2 and C2 respectively
Upvotes: 1
Reputation: 46451
Surname can be extracted with this version
=REPLACE(LEFT(A1,FIND("@",A1)-1),1,FIND(".",A1),"")
Upvotes: 1
Reputation: 17515
Name: =LEFT(A1,SEARCH(".",A1)-1)
Surname: =MID(A1, SEARCH(".",A1)+1,SEARCH("@",A1)-SEARCH(".",A1)-1)
Upvotes: 3
Reputation: 4771
I would use the Left and Mid functions to get columns 2 and 3, respectively. I will write out the formula for you in a minute...
Column 2:
=LEFT(A1,FIND(".",A1)-1)
Column 3:
=MID(A1,FIND(".",A1)+1, FIND("@",A1)-FIND(".",A1)-1)
Upvotes: 2