Lookup with a range

yashgt

New Member
Joined
Jul 9, 2018
Messages
10
Office Version
  1. 2013
Platform
  1. Windows
I have a few items for lookup defined in a range, e.g.
Col A is the name and B is the Category.
BiscuitSnack
SandwichSnack
MilkBeverage
PotatoVegetable

In another sheet, I have column A with free form text which may have a mention of the words listed above. The text cannot have more than one of the above words.
E.g.
I like Biscuits
Need to buy Milk
Milk is healthy

I want to set the value of column B as the Category of the word from the first range, e.g. Essentially I want to identify the word from first range that matches the text in the second range and use the index of the matched word to get a value for the Category.
I like BiscuitsSnack
Need to buy MilkBeverage
Milk is healthBeverage

How to do it?
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Please update your current Excel version in your profile and here. the solution will depend on that.
 
Upvote 0
I would like to add I use Excel 2013
Excel 2013 - I have to rethink and address your query. I shall revert back soon. Actually with age my memory lets me down and I have recall the old formats and functions how they work. But I shall revert.
 
Upvote 0
Hi Fluff, Alex Blakenburg, Peter_SSs

I know I'm very close to solving it, the solution has be in Index-Match combined with LookUp. But I must be doing something very silly.

Somehow I'm not that good at it. And at times when I have think for a complex situation of nesting formulae, I can mess up.

Apologies for breaking the rules of the forum and tagging you people. But I know you people are "out of the box thinkers". I have learnt so much from you people over the years.

All my intention here is that I will learn something new from you people in the process.

Please check below how I approached this problem and help.

Thanks & Regards

All Records.xlsb
ABCDEF
1BiscuitSnackI like BiscuitsTRUE#VALUE!
2SandwichSnackNeed to buy MilkFALSE#VALUE!
3MilkBeverageMilk is healthyFALSE#VALUE!
4PotatoVegetableFALSE#VALUE!
Sheet1
Cell Formulas
RangeFormula
E1:E4E1=ISNUMBER(FIND(A1:A4,D1))
F1:F4F1=INDEX($A$1:$B$4,INDEX((A1:A4),ISNUMBER(FIND($A$1:$A$4,D1,1))*1,1),2)
Press CTRL+SHIFT+ENTER to enter array formulas.
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,224,817
Messages
6,181,149
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