Intelligent VLOOKUP

D

DKS

I would like to program an intelligent Vlookup as follows.

I have a set of data spread over 2 columns. Let us say column A is type of
Food and column B is actual food-item.

for example, here is a short list
Column A Column B
Vegetable Potatoes
Fruit Orange
Fruit Banana
Vegetable Brocolli
Bakery Bread
Bakery Croissants
Vegetable Spinach
Fruit Grapes

I would like to program 2 drop-down lists with following requirements
The first list has as valid values all the FOOD types (thus Fruit,
Vegetable, Bakery).
The second list has as valid values all the items that are valid for the
selected item in first list. Thus if I select Bakery in drop-down list 1
then in list 2 I should see only Bread and Croissants as choices.

Any tips on how to achieve this? FYI: I can sort the data in any order if
that can facilitate the vlookup (or any other useful function).
 
D

DKS

Thanks that did help.
I am in fact trying to provide this drop-down list in a user-form as part of
the "rowsource" property. This seems to work when the form is loaded.
However, once the form is loaded - if I change the original value, the
dependent values do not change. How can I refresh the "rowsource" property
of the drop-down?
 
B

Biff

I'm not familiar with VBA programming.

Biff

DKS said:
Thanks that did help.
I am in fact trying to provide this drop-down list in a user-form as part
of
the "rowsource" property. This seems to work when the form is loaded.
However, once the form is loaded - if I change the original value, the
dependent values do not change. How can I refresh the "rowsource"
property
of the drop-down?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top