Daily tips for using Microsoft Excel.

Tuesday, April 16, 2002

Ivo asks: I was wondering how to separate a column with email@domain.com in to columns [email] and [@domain.com]

There are a couple functions you will use to do this.

=FIND("@",A2) will tell you which position contains the @ in a cell. In your example, this would return position 6.

You can then use =LEFT(A2,FIND("@",A2)-1) to return email
and =MID(A2,FIND("@",A2),LEN(A2)+1-FIND("@",A2)) to return @domain.com

P.S. - Juan Pablo just pointed out that you could do this easily with Data > Text to Columns. Choose Delimited text and make the delimiter be the @ sign.