Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, I have a ReportOwnerQuery Sheet with a list of emails in with Column C being seperated by commas like "emailone@email.com, emailtwo@email.com". I need to Vlookup or a similar method to check to see if one of the emails in column C of ReportOwnerQuery is on the OwnerList sheet which contains owner emails in A2:A60. If one of those emails is an owner email for the cell then place in in Column D of ReportOwnerQuery. If there is a VBA for this as well that could help I would gladly use that too.

What I have tried:

In cell D2 of ReportOwnerQuery: =VLOOKUP(&"*",OwnerList!A1:A1000,1,FALSE) returns a #N/A
In cell D2 of ReportOwnerQuery: =VLOOKUP(&"*",OwnerList!A1:A1000,1,TRUE) returns an incorrect email from OwnerList
Posted
Updated 16-Apr-19 3:32am
v3
Comments
RedDk 15-Apr-19 14:17pm    
How many worksheets does this CSV contain? Can you save this .csv? And when you get a prompt when you save this .csv telling you that some functionality might be incompatible if you try, do you save it as .xlsm instead?
Trogers96 15-Apr-19 14:26pm    
I meant that only column C is in a CSV type format. I improved my question to hopefully add more clarification.
Patrice T 16-Apr-19 9:11am    
a csv contain 1 worksheet. it is a flat list of raw data.

 
Share this answer
 
Quote:
In cell D2 of ReportOwnerQuery: =VLOOKUP(&"*",OwnerList!A1:A1000,1,FALSE) returns a #N/A
In cell D2 of ReportOwnerQuery: =VLOOKUP(&"*",OwnerList!A1:A1000,1,TRUE) returns an incorrect email from OwnerList

This is exactly the expected behavior for VLOOKUP.
Quote:
If one of those emails is an owner email for the cell then place in in Column D of ReportOwnerQuery.

Yes but what to put in cell when there is no match ?
Because the behavior you describe is the one when the email address is not in the list.
I would try something like:
VB
=IF(ISERROR(VLOOKUP(&"*",OwnerList!A1:A1000,1,FALSE)),your result,your result)
or 
=IFERROR(VLOOKUP(&"*",OwnerList!A1:A1000,1,FALSE),your result)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900