LOOKUP Function

spersad

New Member
Joined
Feb 22, 2011
Messages
15
Hello all:

I have a coloumn of ~6000 rows. I copied this list from a PDF file, in order to extract emails. The emails are in the format:

Email: leneee.foo1@company.com


I am trying to write a function or macro that searches this column, finds the key word "email" or a pattern string "Email:" and copies that email address into a cell. My objective at the end is to have all emails in one list/vector/column that I can extract into a database.

I thought I could use the LOOKUP function for this. But I am not sure how to match it by keyword = email, or how to extract the entire email address/cell to another cell.

Is there a better way to do this vs. what am trying ?


Thanks in advance for the help.

Cheers,

Leneee
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Perhaps it would be worth tidying up the data first? Use Replace on the worksheet and replace all instances of "Email: " with nothing. That should leave the email addresses as a single string.
 
Upvote 0
Hi vgreen:

Thank you. I tried your suggestion and now its a single email address. Do you know an easy way to extract it now that it is a string ? They are buried in a list with 6551 rows. According to the Find and Replace, there should be about 600 email address as part of the this list.

Thanks for the help.


Thanks,

Leneee
 
Upvote 0
Hi there
If you're doing this only once, try using a second column which searches for the @ symbol. If True or False you could lookup the cell value, and later Paste-Copy values onto a new sheet.

Kevin
 
Upvote 0
Thank you Dutch. Do you know what the typical code for that would look like ? Am assuming I should use VBA ?


Thanks.
 
Upvote 0
Hi Spersad.
I assume data is in column A, then put in column B the following.
=IF(ISERROR(FIND("@";A1));"";A1)
Kevin
 
Upvote 0
Hi DutchKevin:

Thanks for this. I tried the following and it worked:

IF(ISNUMBER(Search("@",A2)),"yes","no")

And that seem to work! Thanks so much!


Cheers,

Leneee
 
Upvote 0

Forum statistics

Threads
1,224,517
Messages
6,179,240
Members
452,898
Latest member
Capolavoro009

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
Back
Top