Vlookup with cells contains a specifc word

shahdelsol

Active Member
Joined
Jul 21, 2009
Messages
266
I am using this formula and it is working fine but the only problem is the cell must contains the exact word and nothing else. How do I change it to where if vlookup finds the specific word in this example "apple" in column 12 would return true or false. Let's say if the cell value "apple is red" that's true or if the cells value is "apple/orange/245", that is also true. Right now the formula returns true if cells has only "apple" in it and nothing else.

Code:
=IF((VLOOKUP($O$3,INDIRECT("'"&INDEX($V$1:$V$30,MATCH(TRUE,COUNTIF(INDIRECT("'"&$V$1:$V$30&"'!$A$2:A150"),$O$3)>0,0))&"'!$A$2:P150"),12,0))= "apple", TRUE, FALSE )
 
Last edited:

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,203
Control+shift+enter...

=ISNUMBER(SEARCH("apple",VLOOKUP($O$3,INDIRECT("'"&INDEX($V$1:$V$30,MATCH(TRUE,COUNTIF(INDIRECT("'"&$V$1:$V$30&"'!$A$2:A150"),$O$3)>0,0))&"'!$A$2:P150"),12,0)))
 

shahdelsol

Active Member
Joined
Jul 21, 2009
Messages
266
Thank you so much. I did work! I tried something like that but I must have typed something wrong.
 

Watch MrExcel Video

Forum statistics

Threads
1,130,047
Messages
5,639,763
Members
417,109
Latest member
996

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
Top