How to get domain from e-mail

  • Thread starter Michael Degroote
  • Start date
M

Michael Degroote

Hello,

Right now I have a worksheet with a lot of e-mail addresses in a column.
Now I want to put the domain name for each of these e-mail addresses in the
cell next
to it.

Example: (e-mail address removed) (this is the e-mail address)
Now I need "collegewaregem" to be put in the cell next to it.

Is there a formula to do this?

Thanks
 
P

Pete_UK

This will give you everything to the right of the @ symbol.

=RIGHT(A1,LEN(A1)-SEARCH("@",A1))

Hope this helps.

Pete
 
D

Dave Peterson

Another option...

Copy the range (a single column, right??)
to where you want it to be.

Then select that new column
Data|Text to columns
Delimited by other (@) and skip the first field.

Then do it once more, but delimited by other (. a dot).
And skip the second and third and fourth and ... fields.

Then you'll end up with
collegewaregem
instead of
collegewaregem.be

(the top level domain .be, .com, .net, ... will be gone, too.)
 
T

T. Valko

Try this will extract everything between the "at" sign and the first "dot"
after the "at" sign:

=MID(A1,FIND("@",A1)+1,FIND(".",A1,FIND("@",A1)+1)-1-FIND("@",A1))
 
D

Dave Peterson

Another way (still manual)

Copy the range to it's final home
Select that column
Edit|Replace
What: *@ (asterisk followed by the at sign)
with: (leave blank)
replace all

Then with that range still selected
Edit|replace
what: .* (dot followed by asterisk)
with: (leave blank)
replace all
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top