Vlookup with cells contains a specifc word

shahdelsol

Active Member
Joined
Jul 21, 2009
Messages
276
Office Version
  1. 365
Platform
  1. Windows
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

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
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)))
 
Upvote 0
Thank you so much. I did work! I tried something like that but I must have typed something wrong.
 
Upvote 0

Forum statistics

Threads
1,214,861
Messages
6,121,973
Members
449,059
Latest member
oculus

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