VLOOKUP and search within string

kathleenfarber

New Member
Joined
Sep 26, 2016
Messages
32
Office Version
  1. 365
Platform
  1. Windows
Hi,

I am looking for some assistance on how to vlookup and search within a string then return yes or no. I have never searched within a string and I'm completely lost.

SHEET 1 - DB EXPORT:

COLUMN ACOLUMN BCOLUMN CCOLUMN DCOLUMN ECOLUMN F
companylast namefirst namejob titleemail addressindications
Novarphillipstomdirectortom.phillips@novar.comcf, gh, nagh, pro
Agracookekarolynmanagerkarolyn.cooke@agra.comgh, pro
Otisstewartmarkdirectormark.stewart@otis.comgh, nagh, pro

SHEET 2 - WORKING FILE:

COLUMN ACOLUMN BCOLUMN C
email addressindicationYes or No
tom.phillips@novar.comproyes
karolyn.cooke@agra.comghyes
mark.stewart@otis.comabgno

I need to match sheet 2 column A to sheet 1 column E then search the indication in sheet 2 column B and find it in sheet 1 column F. If found, result is yes or no.

Your help is greatly appreciated.
~kat
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Try (untested)
in Sheet2!D2
=IF(ISNUMBER(SEARCH(B2,VLOOKUP(A2,Sheet1!E$2:F$1000,2,0))),"Yes","No")
and copy down column D
 
Upvote 0
It works with one minor issue. Thank you in advance!

I have two indications that are similiar.

NAFLD
AF

Any way to restrict one column to display a result for NAFLD and the other AF. My indication column could realistically look like NAFLD, AF, PRO, NAGH

So if an individual has NAFLD but not AF--NAFLD should be YES and AF should be NO. Right now both are reporting YES.

Thoughts?
 
Upvote 0
Does this mod to Special-K99's formula sort it
=IF(ISNUMBER(SEARCH(B2&",",VLOOKUP(A2,Sheet1!E$2:F$1000,2,0)&",")),"Yes","No")
 
Upvote 0
It looks like that did it. Woot! Thank you so much for all the help!!

Can you explain what the changes did to make it work?
 
Upvote 0
It adds a comma to the end of the B2 value & to the result of the Vlookup, so would be checking
AF, against NAFLD, PRO, NAGH,
Which prevents it from returning a false positive for NAFLD
 
Upvote 0

Forum statistics

Threads
1,214,936
Messages
6,122,340
Members
449,079
Latest member
rocketslinger

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