Parsing Strings in Excel

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

I have a list in Excel from A1:A100 with names like the ones mentioned
below:

Michelle Fooo ([email protected])
Myhaass Smith ([email protected])


I want to parse them using string functions to the following format

(e-mail address removed)
(e-mail address removed)

Any ideas how to do this using a formula?

Thanks in advance
Michael
 
I put your two tests in Cells A1 and A2.

Paste this into a column and fill down:
=MID(A1,FIND("(",A1)+1,FIND(")",A1)-FIND("(",A1)-1)

Cheers,
Jason Lepack
 
One possible answer in the other group, but if you want the names out as
well then

=REPLACE(MID(A1,FIND("(",A1)+1,LEN(A1)-FIND("(",A1)-1),FIND("@",MID(A1,FIND("(",A1),LEN(A1)-FIND("(",A1)-1)),9,"")

(Assuming first email is in A1)

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
www.nickhodge.co.uk
 
Jason

That won't remove the exchange bit (I suspect they've moved servers ;-))

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
www.nickhodge.co.uk
 
Or maybe you want them all lower case too

=LOWER(REPLACE(MID(A1,FIND("(",A1)+1,LEN(A1)-FIND("(",A1)-1),FIND("@",MID(A1,FIND("(",A1),LEN(A1)-FIND("(",A1)-1)),9,""))

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
www.nickhodge.co.uk
 
Thanks! This is awesome :)

- Michael

Nick Hodge said:
Or maybe you want them all lower case too

=LOWER(REPLACE(MID(A1,FIND("(",A1)+1,LEN(A1)-FIND("(",A1)-1),FIND("@",MID(A1,FIND("(",A1),LEN(A1)-FIND("(",A1)-1)),9,""))

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
www.nickhodge.co.uk
 

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

Back
Top