Data Validation Dependent Drop Down Box Error

MHau5

New Member
Joined
Oct 23, 2021
Messages
26
Office Version
  1. 2019
Platform
  1. Windows
I have a four columns on a sheet1, say like this:

CategorySub Category1Sub Category2Sub Category3
Sub Category1Value 1Sub-cat2 value 1Sub-cat3 value 1
Sub Category2Value 2Sub-cat2 value 2Sub-cat3 value 2
Sub Category3Value 3Sub-cat2 value 3Sub-cat3 value 3
Sub Category4Value 4
Sub Category5

I'm using data validation on sheet2 to create a drop down box in a column, where the user can select the sub-category in column 1 from the drop down, using the setup below:

Allow = List
Source = 'Sheet1'$A2:A$A4

Then, in the adjacent columns, I am using another data validation rule to allow the user to grab a value related to the sub-category that was chosen, using the setup below:

Allow = List
Source = indirect(a1)

The issue is that if I grab Sub Category1 or Sub Category3, the adjacent column will return the values from those particular columns. However, if I choose Sub Category2 from the drop down, then the values don't appear.

Any help would be appreciated. TIA.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
OK ... Here is a lengthy answer ...
I hope this helps.

1) I like to create a dedicated Sheet for my Lists and any other configuration kind of information,
e.g. sheet name = "Lists"
2) on your "Lists" sheet add your table like this:
DynamicDataValidationLists.xlsm
GHIJK
1
2Sub Category1Sub Category2Sub Category3Sub Category4Sub Category5
3SC1-V1SC2-V1SC3-V1SC4-V1SC5-V1
4SC1-V2SC2-V2SC3-V2SC4-V2SC5-V2
5SC1-V3SC2-V3SC3-V3SC4-V3
6SC1-V4SC4-V4
7SC4-V5
Lists


3) In the Name Manager (defined names) create 6 named lists: 1) for the SubCategories, and 5) for the SubCat Values if you. If your Sub Categories can be conveniently named like your example
SubCategory_1, SubCategory_2, .... It makes the implementation of your SubCatValues much easier.

Create named lists like you see listed below (snapshot from the Name Manager dialog box)
1691584700196.png


For your data validation where you will select your SubCategory you will set up your SubCategory list as:
1691584996326.png


For your data validation list for your SubCat Values (here is where convenient naming is helpful) the Data Validation list will be:
1691585182649.png

the value inside the "()" is the Named Range for the desired value list. Example, if SubCategory_1 was selected
this algorithn gets the "1" from the selected SubCategory, and builds the SubCat list name "SC1Values".

If you do not have conveniently named SubCategories the process is basically the same with an added step.
 
Upvote 0
However, if I choose Sub Category2 from the drop down, then the values don't appear.
Make sure that you do not have any typos in either the range names or the drop-down values.
 
Upvote 0
Make sure that you do not have any typos in either the range names or the drop-down values.
Hmm - they appear in my test sheet. (did you check yours for typos?)

Here is my test sheet:
DynamicDataValidationLists.xlsm
EF
1Select a Sub CatSub Category2
2Select a TaskSC2-V3
Sheet1
Cells with Data Validation
CellAllowCriteria
F1List=SCList2
F2List=INDIRECT("SC" & RIGHT(F1) & "Values")
 
Upvote 0
I was talking to the OP as he/she said the 2 work & 1 doesn't.
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,264
Members
452,627
Latest member
KitkatToby

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