I have the following format in Excel and I am trying to extract the data between the characters:
First Last <email@example.com>
I need to extract the email address between < and > into its own cell
migrated from stackoverflow.com Oct 24 '12 at 2:02
This question came from our site for professional and enthusiast programmers.
use the following formula, assuming your data is in cell A2
To avoid error message if your data is not conforming, you can use the following in excel 2007 and up:
For maybe a simpler approach, or maybe just a different approach without formulas.
You can do a
Done (unless some of your data doesn't conform!!!)
The answer of nutsch doesn't work if the two characters are the same.
I think this is better:
=MID(K370, FIND("a",K370)+1, FIND("b", K370, FIND("a", K370)+1)-FIND("a",K370)-1)
where K370 is your source cell and "a" and "b" are the two consecutive chars.
you can select the column of your data and choose "text to columns" in "Data" tab in the ribbon. then choose "delimited" and click next. then in delimiters type "<" and click next. then click finish. do the same way for delimiter ">" and it's ok. note this is not the simple way bat it will learn you a soloution for other questions. have fun
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?