Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
harpscardiff
 
Posts: n/a
Default Extracting out of a emai address string


Hi,

I'm trying to extract the domain name/company name of an email address
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.


--
harpscardiff
------------------------------------------------------------------------
harpscardiff's Profile: http://www.excelforum.com/member.php...o&userid=25960
View this thread: http://www.excelforum.com/showthread...hreadid=550354

  #2   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default Extracting out of a emai address string

Hi
Try this:
=MID(A2,SEARCH("@",A2)+1,SEARCH(".",A2)-SEARCH("@",A2)-1)

Andy.

"harpscardiff"
wrote in message
news:harpscardiff.2954io_1149865806.8229@excelforu m-nospam.com...

Hi,

I'm trying to extract the domain name/company name of an email address
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.


--
harpscardiff
------------------------------------------------------------------------
harpscardiff's Profile:
http://www.excelforum.com/member.php...o&userid=25960
View this thread: http://www.excelforum.com/showthread...hreadid=550354



  #3   Report Post  
Posted to microsoft.public.excel.misc
harpscardiff
 
Posts: n/a
Default Extracting out of a emai address string


Thanks for the reply.

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


--
harpscardiff
------------------------------------------------------------------------
harpscardiff's Profile: http://www.excelforum.com/member.php...o&userid=25960
View this thread: http://www.excelforum.com/showthread...hreadid=550354

  #4   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default Extracting out of a emai address string

Hi
I suppose this could happen if the name before the @ contained a period?

Andy.

"harpscardiff"
wrote in message
news:harpscardiff.2955wp_1149867612.5751@excelforu m-nospam.com...

Thanks for the reply.

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


--
harpscardiff
------------------------------------------------------------------------
harpscardiff's Profile:
http://www.excelforum.com/member.php...o&userid=25960
View this thread: http://www.excelforum.com/showthread...hreadid=550354



  #5   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default Extracting out of a emai address string

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

Andy.

"harpscardiff"
wrote in message
news:harpscardiff.2955wp_1149867612.5751@excelforu m-nospam.com...

Thanks for the reply.

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


--
harpscardiff
------------------------------------------------------------------------
harpscardiff's Profile:
http://www.excelforum.com/member.php...o&userid=25960
View this thread: http://www.excelforum.com/showthread...hreadid=550354





  #6   Report Post  
Posted to microsoft.public.excel.misc
harpscardiff
 
Posts: n/a
Default Extracting out of a emai address string


spot on Andy, worked like a charm.

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

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

Cheers.


--
harpscardiff
------------------------------------------------------------------------
harpscardiff's Profile: http://www.excelforum.com/member.php...o&userid=25960
View this thread: http://www.excelforum.com/showthread...hreadid=550354

  #7   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default Extracting out of a emai address string

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"
wrote in message
news:harpscardiff.2957ap_1149869404.5548@excelforu m-nospam.com...

spot on Andy, worked like a charm.

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

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

Cheers.


--
harpscardiff
------------------------------------------------------------------------
harpscardiff's Profile:
http://www.excelforum.com/member.php...o&userid=25960
View this thread: http://www.excelforum.com/showthread...hreadid=550354



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Browse File for Mac John Vickers Excel Discussion (Misc queries) 1 February 17th 06 06:23 PM
Extracting Numeric Data from a Delimited Text String [email protected] Excel Worksheet Functions 5 February 10th 06 10:29 PM
extracting numbers from string Chris Dowell via OfficeKB.com Excel Discussion (Misc queries) 1 January 12th 05 09:37 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM
Extracting numeric values from string RJF Excel Worksheet Functions 3 January 5th 05 10:48 PM


All times are GMT +1. The time now is 01:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"