I have a list of emails in Excel 2010 that are like this: Row L2:joe@first.com,john@second.com

Row L3:mike@second.com,speedy@third.com

Row L4:mary@second.com

Row L5:tomthumb@third.com,moonbounce@first.com,sam@second.comI would like to extract all of the emails from a specific domain (@second.com). The text to columns just splits them at the delimiter. Any ideas on how to extract based on the domain? Please and Thank you!

What is the maximum number of email addresses that you might have strung together in a given cell?

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Three seems to be the most in anyone give cell. Those are few and far between. Two is the predominate number. Thanks!

Pick a cell in which you will enter your desired domain name. For the following formula I chose I1. Do your Text-To-Columns to split your data across Columns L:N.

Enter this formula in a cell and drag it down. I split it across 3 lines to make it look better in this post. You may need to put it back together.

=IF(NOT(ISERROR(FIND($I$1,L2))),L2,

IF(NOT(ISERROR(FIND($I$1,M2))),M2,

IF(NOT(ISERROR(FIND($I$1,N2))),N2,"")))What it does is try to find the domain name in Column L, then M, then N, returning the value in that column if FIND does NOT return an Error.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Awesome! That was exactly what I was looking for and it works like a charm. Thanks for the quick help!!

Ask Your Question

Weekly Poll