List dependant on another list

anglais428

Well-known Member
Joined
Nov 23, 2009
Messages
634
Office Version
2016
Platform
Windows
Hi,

I am trying to use the data validation to come up with 2 dropdowns (list boxes) with one depending on the other. I have a list of countries (72 locations say Argentina to Vietnam). I want these to appear in the first dropdown in A1 - I can do this (using list box). I then want (in A2) another dropdown that depends on which country is chosen in A1. e.g. If Argentina is selected in A1 only Buenos Aires should be available in the dropdown in A2.

I have a list of Countries and Cities side by side e.g. Argentina (cell E1) and Buenos Aires (cell F1). The range of this is E1:F289

Any help linking the second dropdown to the first would be great.

THanks,
 

Some videos you may like

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

anglais428

Well-known Member
Joined
Nov 23, 2009
Messages
634
Office Version
2016
Platform
Windows
I have solved the above problem, apart from the fact that when i go to change between countries (1st dropdown) the previous countries city (2nd Dropdown) remains in cell A2 until I select again from the dropdown.
e.g.
A1: Selected Argentina from dropdown
A2: Buenos Aires appears in dropdown and is selected
Go back to A1 and Select Australia
A2 still displays Buenos Aires, however when i click on the dropdown it displays all the Australian cities.

Can anyone think of a way to get round this?

thanks
 

Christiaan

Board Regular
Joined
Nov 5, 2012
Messages
80
Anglais,

I am looking into the same issue.
How did you get it to work where the 2nd ListBox is depending on the other?!

Regards,
Christiaan
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,856
Messages
5,513,814
Members
408,971
Latest member
kay_dee8

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top