I got n
Categories which hold m
Products. This list is unsorted, for example like this:
Now here's what I basically want to do with this list:
Dropdown: Data validation which dynamically stores a list of each unique value of the first column (= I won't be able to select Category_5 since it does not exist yet).
Dropdown: Provide a list of all products based on the selected category in the first Dropdown.
Is there any non-VBA solution for this?
Example spreadsheet layout:
A2:A13
- Category list, the items are not uniqueB2:B13
- Product listCell D2
down - Dropdown list 1 source, unique items, dynamicCell F2
down - Dropdown list 2 item incremental number 1.. (less calculations in the formula)Cell G2
down - Dropdown list 2 source, dynamicCell I2
- Dropdown cell 1Cell J2
- Dropdown cell 2Cell
D2
: array formula (Ctrl-Shift-Enter from formula window to enter, curled brackets are inserted by Excel, not by a user), copied downwards:Gives a unique list of categories.
Cell
G2
: array formula, follow instructions in the previous section:Gives a list of products under a category selected in cell
I2
.The lists are not sorted: better to sort the initial lists by category and product.
No error handling: the formulae should be updated with
IF ISERROR
clause.Dynamic_dropdown_lists.xls
To make it work without VBA in Excel you'd need some way of resetting the range of valid entries for the data validation in Column 2 and since the source can only be a list or a range you'd have to code something to change that information when the associated Column 1 value changes.
If you don't want to go the VBA route then those kinds of activities are bread & butter for a database like Access (or maybe InfoPath) which would better suit your needs.