- last edited on
I'm trying to create a form with Province, City, District dropdowns being dependent on each other. I was able to create the dropdown for the provinces and make city dropdown only populate cities within the selected province, but when it comes to districts in the province/city combination i cant seem to get results. Can anyone help?
08-17-2017 02:31 AM
Here is an example with 3 dependent lists (Country, Region, City), i guess close to your case
08-17-2017 06:52 PM
Thanks for the quick response! I tried this method but this doesnt seem scalable to large quantities of data as i would have to make multiple verticals per state. Im actually working on the entire philippines and have attached the sample data to help clarify would you happen to know of any alternative?
08-18-2017 01:56 AM
Okay, i see the point. Will play with this bit later.
08-18-2017 07:59 AM
I continue with your data structure, the only uses your Tables instead of ranges like $A:$A - better at least from performance point of view.
Instaed of Table1`,.. they are renamed as Province, ProvinceCity and AllData.
Name of the used columns are added to list of names (see in Names Manager), references as here
Thus for the first list (Province) the formula is
(to work with tables we have to use INDIRECT, structured references don't work within list formulas)
Next one for the City which depends on Province is actually as yours, only in tables notation
For the third list we shall filter selected Province and City what we do in MATCH with AND condition; and number of rows is calculated by COUNTIFS with two conditions (instaed of COUNTIF)
The file is attached
01-21-2020 09:10 AM
@Sergei Baklan I stumbled across this post from over two years ago and it fits an issue I am trying to resolve as well. I followed the listing.xls file you posted but the dropdown in column C does not appear to be working. Something seems to be wrong with the data validation in that column as none of the Barangay dropdowns work. Do you know what needs to be fixed in the validation formula for this dropdown? Id like to apply the concept to a Dependent Validation drop down table I have setup but cant get it to work.
01-21-2020 03:40 PM
You are right, third column doesn't work properly. If open data validation settings and Ok list in the cell is shown for a while, after that stop working.
Anyway, that's a bug, so far don't know there. Could you please say me are you on Excel; version with dynamic arrays or not?
01-21-2020 04:14 PM
For last 3 cells I use named formula for data validation and it works. For thirst 3 it is direct formula and it doesn't work after re-opening.
Will play some more with that, but later.
01-22-2020 05:49 AM
@Sergei Baklan Thanks for the prompt reply. I am office 365 for the Excel version. Ill take a look at the updated file today. I did some searching yesterday on it and it appears Arrays cause problems in the data validation. They work while the file is open after you enter the formula. But if you save and close, then reopen the file, it no longer works.
01-22-2020 01:55 PM
Yes, exactly the same issue on some other files. But that's not only on Excel with Dynamic Arrays, I checked on semi-annual version (pre-DA Excel) - same story.
07-11-2020 02:27 PM