1

I have a column made up of emails. MOst of these are in the following format:

name.surname@domain.com

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:

name.surname@domain.com       name         surname

Any help is much appreciated.

Cheers

Alex K.
  • 171,639
  • 30
  • 264
  • 288
user1038814
  • 9,337
  • 18
  • 65
  • 86
  • 2
    [This existing question][1] shows how to break out substrings in Excel. [1]: http://stackoverflow.com/questions/6133287/how-to-extract-the-last-substring-from-a-excel-column –  Jan 29 '13 at 14:25

4 Answers4

3

Name: =LEFT(A1,SEARCH(".",A1)-1)

Surname: =MID(A1, SEARCH(".",A1)+1,SEARCH("@",A1)-SEARCH(".",A1)-1)

Peter Albert
  • 16,917
  • 5
  • 64
  • 88
2

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)
weir
  • 4,521
  • 2
  • 29
  • 42
1

Surname can be extracted with this version

=REPLACE(LEFT(A1,FIND("@",A1)-1),1,FIND(".",A1),"")

barry houdini
  • 45,615
  • 8
  • 63
  • 81
1

Considering the format is firstname.lastname@domain.com, the first row is your header row and you need the first and last name in proper format, here's the formula

First Name

=PROPER(MID(A2,1,FIND(".",A2)-1))

Last Name

=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

Community
  • 1
  • 1
Sasmit
  • 160
  • 1
  • 10