getting the text between <>

mac10001

New Member
Joined
Jun 18, 2012
Messages
5
Hi All,

I've been given a messy excel sheet with email addresses. With messy I mean some rows have an "email address", others have "first name last name <email address>", others have well I will probably ask about those later, in the mean time. I want to get all the email addresses only from the "first name last name <email address>", in other words, I want to pick out anything between the < >, I am hoping there's a way to do this other than manually. Does anyone have any suggestions?

Your help is appreciated!

Mac
 

Some videos you may like

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
19,703
Office Version
  1. 2016
  2. 2013
  3. 2007
Platform
  1. Windows
Hi and Welcome to the Board
Can you post a couple of samples of what you have , and the desired result.
It's way easier than trying to explain it.
 

mac10001

New Member
Joined
Jun 18, 2012
Messages
5
Thanks for the reply Michael,

Here's what the cells look like: john doe <john.doe@gmail.com>
Here's what I want the cells to look like: john.doe@gmail.com

Thanks again.

Mac
 

mac10001

New Member
Joined
Jun 18, 2012
Messages
5

ADVERTISEMENT

Lets try this again, the system is screwing it up.

The way the cells look is : john doe <email address>
The way I would like for them to look is : email address
 

narendra

Board Regular
Joined
Apr 15, 2008
Messages
87
Let us assume the name and email address is in cell "A1" and it looks something like this: "Adam Smith <adamsmith@aol.com>" and then the email address in between </adamsmith@aol.com>"<" and ">" sign.

<adamsmith@aol.com>Use the below formula into an adjecent cell to get the email address. In this case it will extract the text value "adamsmith@aol.com" without the quotes.

=MID(A1,FIND("<",A1)+1,FIND(">",A1)-FIND("<",A1)-1)

As long as you have an email address between "<" and ">" sign, the above formula should work fine.
Hope this helps.</adamsmith@aol.com>
 
Last edited:

mac10001

New Member
Joined
Jun 18, 2012
Messages
5

ADVERTISEMENT

Thank you very much Narendra!!!!!!! That works.

I apologize for my 3 messed up relies, for some reason the forum is not showing anything I put between "<" and ">", I put in 3 different ways and it magically disappeared every time!

Again, thank you very much Narendra and Michael for helping out!
 

narendra

Board Regular
Joined
Apr 15, 2008
Messages
87
U r welcome.

I am glad that i could be of some help.

This thread resolved.
 
Last edited:

Michael M

Well-known Member
Joined
Oct 27, 2005
Messages
19,703
Office Version
  1. 2016
  2. 2013
  3. 2007
Platform
  1. Windows
The reason the text is not working is because you need to put a space before / after the <> signs otherwise the system thinks it's a HTML Tag.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,499
Messages
5,596,517
Members
414,074
Latest member
Matthew Kakde

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top