Drop Down List

Wuddle

New Member
Joined
Oct 29, 2002
Messages
22
I am trying to create a drop down list that will vary from cell to cell, depending on a set criteria.
In Col A there will be one of three possible codes (e.g.A, B or C). The drop down list (col B)will change depending on the code selected. I've tried it with validation lists but it means changing the lookup for each individual cell in col B. I have no idea about Visual Basic so I'm trying for a solution another way. Can anybody help please??
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
This is from the archive: http://www.mrexcel.com/weblog/archive/2002_01_01_webloga.shtml
Saturday, January 26, 2002

One good use of Data Validation comes when there's a need to "link" two or more comboboxes, making them, dependant.

For example, John asks "I have a list of countries (USA, Australia, England), and a list of cities. How can I make than when the user selects USA in one cell, in the other one appear only cities from USA (New York, Los Angeles), and also for Australia (Camberra, Perth), etc. ?"

The first thing that needs to be done is name the lists. Select the countries, without the title, and name it COUNTRIES. Next, select all cities (Again without titles) from USA and name it USA. Continue this process for every country.

Now, let's assume that the first list appears in A1. Go to Data, Validation, Select List, and in "Source" put

=COUNTRIES.

Make sure that "In-cell dropdown" is checked.

Now, if the second list appears in B1, go to Data, Validation, again Select List, and in "Source" put

=INDIRECT(A1)

If Excel returns an error, don't worry, you don't have anything selected in A1. To test it, select a country in A1, and now, when you click in B1 you should see only the cities from that country.

Addition. Ian Narbeth asked to remind that Defined Names can't include spaces, so, to enter, Great Britain, you would have to put it like "Great_Britain" or "GreatBritain". Thanks for that.

posted by Juan Pablo Gonzalez at 1:08 PM
 
Upvote 0

Forum statistics

Threads
1,214,645
Messages
6,120,711
Members
448,984
Latest member
foxpro

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