Forum Discussion
Autopopulate a drop down from another drop down
How do I set up to autofill several cells (containing drop downs) depending on the value of another drop down?
For example,
If x is selected from the dropdown in column A, then I want Columns B-F to say 'N/A', but if Y is selected, I want columns B-F as drop downs
Thank you
See the attached version. It uses a combination of Data Validation and VBA (in the worksheet module).
12 Replies
See the attached version. It uses a combination of Data Validation and VBA (in the worksheet module).
- bsiemensCopper Contributor
This is exactly what I'm trying to do but I'm having difficulty with the formula. I'm not sure how to use IF, VLOOKUP, etc.
Please download the sample workbook from my first reply.
Right-click the sheet tab of the first sheet and select View Code from the context menu to see the VBA code used.
- M2021LCopper Contributor
HansVogelaar This is exactly what I wanted! Thank you so much.
How do go about setting it up on a different workbook?
You'll need to copy the code from the worksheet module *) to the worksheet module of the sheet you want to apply it to, and modify the code according to the exact setup you have.
*) Right-click the sheet tab and select View Code from the context menu to activate the Visual Basic Editor and view the worksheet module.
I used named ranges for the data validation rules. See Formulas > Name Manager.
- SergeiBaklanDiamond Contributor
You may google for "excel dependant drop-down list", lot of materials with samples. First I received Creating a Dependent Drop Down List in Excel [Step-by-Step Tutorial] (trumpexcel.com)