Extracting out of a emai address string

H

harpscardiff

Hi,

I'm trying to extract the domain name/company name of an email addres
string. So anything after the "@" and before the "."

I've got 400 emails and i've got to catergorise them by company.

Your help is much appreciated
 
H

harpscardiff

Thanks for the reply.

I've tried it, works for some and not for others. theres no obvious
pattern?
 
H

harpscardiff

spot on Andy, worked like a charm.

Not compulsory, any chance you can explain whats going on in th
formula?

I understand the Mid, but the rest, i didn't know it was possible.

Cheers
 
G

Guest

Hi

=MID(A2,SEARCH("@",A2)+1,SEARCH(".",A2,SEARCH("@",A2))-SEARCH("@",A2)-1)

The MID function uses 'cell', followed by 'start address', followed by
'number of characters to return'.
The 'cell' is A2.
The 'start address' is 'find the position of @ and add 1'.
The 'number of characters' is 'find the position of . after the @'

Hope this helps! It may be useful for you to use a very simple example and
then select each part of the formula in the formula bar and press F9 to view
its results.

Andy.

"harpscardiff" <[email protected]>
wrote in message
news:[email protected]...
 
Top