Hello,
I have this code that filters data by the selection in cell 8 (data variation). Can I please have your help to modify ByVal Target As Range to ByVal Target As Object so it filters by the selection made in combobox1?
I have this code that filters data by the selection in cell 8 (data variation). Can I please have your help to modify ByVal Target As Range to ByVal Target As Object so it filters by the selection made in combobox1?
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$8" Then
If Range("C8").Formula = "All" Then
Range("A13").AutoFilter
Else
Range("A13").AutoFilter Field:=13, Criteria1:=Range("C8")
End If
End If
End Sub
Last edited by a moderator: