Scenario:
The user selects a region (Dropdown1) then gets to choose from the filtered product codes list (Dropdown4) to populate the sales data sheet. The problem is, when you change the region, the product code list remains at whatever row number had been set previously.
I need a macro that resets the value of a dependent Combo Box (Form Control) to 1 whenever the main Combo Box (Dropdown1) changes (irrespective of the change value).
The settings for the two boxes are shown below.
DropDown1 (Region)
INPUT RANGE: $S$2:$S$10
CELL LINK: $E$3
DropDown4 (Product Code)
INPUT RANGE: U:U
CELL LINK: $E$5
The values in the Input Ranges are simply hard-coded filtered lists based on the value in the cell link. For example, the data in column U is derived as follows:
I am using the following code to reset Dropdown 1 whenever the document is opened:
The user selects a region (Dropdown1) then gets to choose from the filtered product codes list (Dropdown4) to populate the sales data sheet. The problem is, when you change the region, the product code list remains at whatever row number had been set previously.
I need a macro that resets the value of a dependent Combo Box (Form Control) to 1 whenever the main Combo Box (Dropdown1) changes (irrespective of the change value).
The settings for the two boxes are shown below.
DropDown1 (Region)
INPUT RANGE: $S$2:$S$10
CELL LINK: $E$3
DropDown4 (Product Code)
INPUT RANGE: U:U
CELL LINK: $E$5
The values in the Input Ranges are simply hard-coded filtered lists based on the value in the cell link. For example, the data in column U is derived as follows:
Excel Formula:
IF($E$3=4,FILTER(Product_Code, Region=$T$4))
I am using the following code to reset Dropdown 1 whenever the document is opened:
VBA Code:
Private Sub Workbook_Open()
Worksheets("Sheet1").Range("E3") = 1
End Sub