# Lists, Validation and update of values.

#### bennialexander

##### New Member
Greetings all,

I was wondering if somebody would be able to help me with lists here without it being too complicated, I am, unfortunately, a little lame in the applications area, since I am a network engineer.

Here's my issue.

Assume three columns:
A - Category, B is Item, and C is Price.

This is what I am trying to create e.g.:

List of things to buy this week:

Vegetables
Fruits
Meat

Depending on what I choose, it should give me a sub-list in the adjacent column, where if Vegetables is selected, then only a list of vegetables in the list are shown.

So far, so good. I.e., I managed to do that.

Now here is where I am stuck.

1. I need that once I select the vegetables, e.g. Cauliflower, the price of the item should be automatically displayed in the column C, i.e. it should pick the prices from the adjacent worksheet.

2. If I were to change the category in the column, then the corresponding adjacent cells (item and price) should be reset, i.e. be blank.

Thanks a lot.

With best regards,
Benni

bennialexander@ureach.com

### Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
I didn't bother to set up any dropdown lists or anything for this example, but would this work for you?

Edit: This will work if all of your items are in the same column (like I have).
Book1
ABCDEF
1CategoryItemPriceVegetables
2VegetablesCauliflower\$1.25Cauliflower\$1.25
3Spinach\$3.00Carrot\$2.50
4 Spinach\$3.00
5MeatChicken\$4.35Meat
6Beef\$5.50Beef\$5.50
7Chicken\$4.35
Sheet1

Von Pookie said:
I didn't bother to set up any dropdown lists or anything for this example, but would this work for you?

...

=IF(B2="","",VLOOKUP(B2,E1:F7,2,FALSE))

...

You need to lock

E1:F7

though.

Hi Von,

Hi! Yes, absolutely. That is great. Thanks a lot.

Now, how do *I* do it? Or would you baby-feed me by sending me the file at my email address?

BTW, does this also blank the adjacent cells, e.g. if I were to change the category to something else e.g. if I change the existing value (e.g. Vegetables) in categories to e.g. meat?

Thanks once again.

With best regards,
Ben

Greetings once again,

BTW, can I also have the database on another worksheet and refer to it there?

Thanks.

With best regards,
Ben

Ben,

You should be able to do this from a separate sheet.

btw, named ranges work excellent for cross-sheet equations, and tidy's up your formula a bit. navigation quickens a bit too.

Replies
0
Views
125
Replies
15
Views
594
Replies
3
Views
147
Replies
9
Views
311
Replies
3
Views
170

1,217,675
Messages
6,137,927
Members
450,099
Latest member
Pushbutton

### 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.

### Which adblocker are you using?

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

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