PDA

View Full Version : [SOLVED:] dependent dropdown list



MrBear24
05-31-2022, 03:05 PM
I have this sheet named "DATA". In this sheet, in column G is the data that I want to consolidate in drop-down lists. These are subdivided by Countries, for example France contains the Cities from row 2 to 6 (Lyon,Paris,Bordeaux,Toulouse,Toulon) so that would be a consolidated dropdown list, so on with the following countries (there are quite a few countries with their respective cities in their respective columns).

IMG 1: Check the link: https://ibb.co/LZst89F


What I need is for the macro to create those dropdown lists in the next "List" sheet in column E (City column) based on what I put in the column D (Country column). For example, if I write Denmark in column D, in the next column E, same row, the macro would place the drop-down list that corresponds to it according to the DATA sheet (Copenhagen,Odense,Aalborg). I would need this to happen for any Country I put in column D based on the Data sheet.

IMG 2: Check the link: https://ibb.co/sv2sP12

macropod
05-31-2022, 08:44 PM
See, for example:
https://www.excelforum.com/excel-formulas-and-functions/1306305-dependent-drop-down.html
http://www.eileenslounge.com/viewtopic.php?f=27&t=8830

MrBear24
06-01-2022, 07:54 AM
It seems to me that the only way to execute this task is through a macro since the amount of data that I have in the countries can be infinite.

macropod
06-01-2022, 03:09 PM
Large, maybe, but not infinite... Good luck trying to implement and maintain that in code.

georgiboy
06-06-2022, 02:39 AM
Maybe have a play with something like the attached?