Forum Discussion
Octavia_Consulting
Jun 28, 2023Copper Contributor
Drop-Down List
How do I setup a Dynamic Drop-Down List?
i.e. Column A is a category and Column B is drop-down list is contingent upon what was selected in Column A
ALSO - Is there a way to add a field to Drop-Down List that can be edited ?
- NikolinoDEGold Contributor
To set up a dynamic drop-down list in Excel where the options in Column B are dependent on the selection in Column A, you can use data validation and named ranges. Here's a step-by-step guide:
- Create a list of categories in Column A. Each category should have a unique name.
- Set up the options for each category in separate ranges. For example, create named ranges for each category's options. The named ranges should correspond to the category names in Column A. You can do this by selecting the range of options, going to the "Formulas" tab, clicking on "Name Manager," and creating a new named range for each category.
- Select the cells in Column B where you want the drop-down lists to appear.
- Go to the "Data" tab in the Excel ribbon and click on "Data Validation."
- In the "Data Validation" dialog box, under the "Settings" tab, choose "List" as the validation criteria.
- In the "Source" field, enter the formula that references the appropriate named range based on the selection in Column A. For example, if the current cell in Column A is A2 and the named range for that category's options is "Category1Options," the formula would be =INDIRECT($A2 & "Options"). This formula uses the INDIRECT function to dynamically retrieve the named range based on the value in Column A.
- Click "OK" to apply the data validation.
Now, the drop-down list in Column B will update automatically based on the selection in Column A.
Regarding your second question, if you want to add a field to the drop-down list that can be edited, you can use the "In-cell dropdown" feature combined with data validation. Here's how:
- Select the cell(s) where you want the drop-down list to appear.
- Go to the "Data" tab in the Excel ribbon and click on "Data Validation."
- In the "Data Validation" dialog box, under the "Settings" tab, choose "List" as the validation criteria.
- In the "Source" field, enter the list of options separated by commas. For example, "Option 1, Option 2, Option 3."
- Check the "In-cell dropdown" checkbox.
- Click "OK" to apply the data validation.
Now, the selected cell will have a drop-down arrow, and you can either choose an option from the list or manually type a value. However, note that this approach does not dynamically change the options based on the selection in another column. The text was created with the help of AI.
Hope this will help you.