Looking Up Data With Range Names

Vintage79

Board Regular
Joined
May 29, 2007
Messages
187
Office Version
  1. 2019
Platform
  1. Windows
Hello All,

I was wondering if anyone can figure out the best way to do this...


Excel 2010
ABCDEFGHIJKLM
1FruitFR001VegVG001MeatMT001TypeNamePriceCode
2Apples£1.20Onions£1.65Pork£3.20
3Oranges£0.95Carrots£1.24Beef£4.80
4Bananas£1.30Leeks£1.00Lamb£5.60
5
6Fruit
7Veg
8Meat
Sheet1
<p style="width:3em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #BBB;border-top:none;text-align: center;background-color: #DAE7F5;color: #161120">Fruit</p><br /><br />

Range names have been set as Fruit=A2:A4, Veg=D2:D4, Meat=G2:G4. Drop down menus exist in columns J & K.
So, the user will select from a drop down list in J2 (the options are A6:A8), and then in K2 they will be presented with the appropriate options. So, if the user selects fruit in J2, they will get a drop down in K2 with Apples, Oranges, Bananas.


This is as far as I have managed to get on my own! Now I would like to use some kind of lookup function in L2, so that the price is returned for the item selected in J2. I think this might be possible using LOOKUP and setting it to search the array from A1:H4. But the problem with this is that as the inventory grows, I expect to have duplicate values. So, I am hoping to point the lookup to the range name that has been selected in J2, and then return the price based on that. Is this possible?

Once I find a way to do this, the last part should be simple...I would like to return the code to M2. So, for fruit, this would be FR001.

I really appreciate any help!
icon_smile.gif
 
Last edited:

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,223,280
Messages
6,171,162
Members
452,385
Latest member
Dottj

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