i have three ranges of cells (from another sheet in my workbook) that store the values that i want to appear on the drop-down (Form Control) list. i need the macro code to reset a cell range, or a named range to define the options in a drop-down list based on other cell value. . i've tried the following code with no success so far:
Sub DropDown11_Change()
If Range("A1") = 1 Then
(input range from sheet1 a1:a50)ElseIf Range("A1") = 2 Then
(input range from sheet2 a1:a50)ElseIf Range("A1") = 3 Then
(input range from sheet3 a1:a50)End If
End Sub
Any suggestions?
Thanks
I have done similar things utilizing named ranges. Here is an example that should help as well.
This should help you out, place either of these in a standard Module (e.g., Module1).
If you want to use named ranges, you can use:
Then, to have these fire upon cell A1 changing, you will need to place the following in Sheet1's module (when you right+click Sheet1 in the VBA Editor Window, select view code...see picture below):