Match partial word: vlookup or index match?

Vcoppens

Board Regular
Joined
Apr 16, 2012
Messages
90
Hi,

I have table1 with in the description in column A a range of words.

The range of words is every time different but some of those words have a common word such as apples, pears, orange, duck or geese.

Table2 has the words that if they appear in the range of words in table1 should result either in X, Z or O.

I am looking for the following solution:
In the first table all rows that have the words "apples" or "pears" or "orange" in column B with an X
All rows with the words "duck" or "geese" in column B with a Z
and any row that doesn't contain any of those words with a O

I have been trying to solve this with vlookup with a partial look up of the word "*"&D2&"*" and index and match but I am not getting the desired results.

Would someone have a suggestion?

Thank you!
DescriptionX/Z/OIf Description containsThen show as
Big brown applesxapplesx
Small red applesxpearsx
Not so good applesxorangex
Anjou pear too smallxduckz
Green pears from Francexgeesez
Orange from Spainxremaining categoryo
Great Nothern Duckz
White Duckz
Flamboyant Duckz
Canadian geese this weekz
Geese not to expect to come backz
Green houseo
Dead end Streeto
Not feeling wello
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi,

A couple things,
1. In my sample, D2:D6, change the items in your Table, to All Singular (e.g. apples to apple, pears to pear, etc.)
2. This formula will still work for overlapping words like "pineapple" in my sample A14, and "appears" in A15.

Book3.xlsx
ABCDE
1DescriptionX/Z/OIf Description containsThen show as
2Big brown applesxapplex
3Small red applesxpearx
4Not so good applesxorangex
5Anjou pear too smallxduckz
6Green pears from Francexgeesez
7Orange from Spainxremaining categoryo
8Great Nothern Duckz
9White Duckz
10Flamboyant Duckz
11Canadian geese this weekz
12Geese not to expect to come backz
13Green houseo
14Dead end Street pineappleo
15Not feeling appears wello
Sheet1063
Cell Formulas
RangeFormula
B2:B15B2=IFERROR(LOOKUP(2,1/SEARCH(" "&D$2:D$6," "&A2),E$2:E$6),"o")
 
Upvote 0
Solution
Hi Jtakw,

Thank you so much for your quick reply.

I will try it out and let you know if it works.

Kind regards,
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

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