Private Sub OptionButton1_Click()
Me.ComboBox1 = ""
Me.ComboBox1.BoundColumn = 1
Sheet1.Range("H3:J3") = ""
End Sub
Private Sub OptionButton2_Click()
Me.ComboBox1 = ""
Me.ComboBox1.BoundColumn = 2
Sheet1.Range("H3:J3") = ""
End Sub
Private Sub OptionButton3_Click()
Me.ComboBox1 = ""
Me.ComboBox1.BoundColumn = 3
Sheet1.Range("H3:J3") = ""
End Sub
Private Sub ComboBox1_Click()
Dim i As Long
If Me.OptionButton1.Value = True Then
Sheet1.Range("H3").Value = Me.ComboBox1.Value
ElseIf Me.OptionButton2.Value = True Then
Sheet1.Range("I3").Value = Me.ComboBox1.Value
Else
Sheet1.Range("J3").Value = Me.ComboBox1.Value
End If
On Error Resume Next
ActiveSheet.ShowAllData
i = Sheet1.Range("A100000").End(xlUp).Offset(1, 0).Row
Sheet1.Range("A" & 2, "G" & i).AdvancedFilter xlFilterInPlace, Sheet1.Range("H2:J3")
End Sub