Truncate email text string in @ section in excel

I have a situation where I have email addresses, but I need to extract the url. For example, I have an email address jsmith@acmecompany.com and I need to delete all the characters before and leave the @ sign, leaving me with the URL “acmecompany.com". I would also like to add "www" in front of the extracted text. Thanks:)

+4
source share
3 answers

You can use FIND to find the @ sign, then RIGHT and LEN to get the part you need.

 =RIGHT(A1,LEN(A1)-FIND("@",A1)) 
+7
source

Divide your email address in half:

Username:

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

Domain:

 =RIGHT(A1,LEN(A1)-FIND("@",A1)+1) 

... +/- 1 adds or removes the @ character

+7
source

To make the URLs valid, you can always set it to ="WWW."&RIGHT(A1,LEN(A1)-FIND("@",A1)+1)

Hot Tip: This is also useful for separating the first and last names in a list, separated by a space or comma, or whatever.

0
source

All Articles