Rajesh Kr Joshi
07-22-2014, 02:29 PM
Hi,
I am using the below code to change the filter in range "B11:K11" based on a dropdown in cell C1 and it is working fine. I want to add another event in the same code targeting range "G12:G31" and "I12:I31" triggering MsgBox "Test".
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$1" Then
If Range("C1") = "All" Then
ActiveSheet.AutoFilterMode = False
Else
ActiveSheet.AutoFilterMode = False
ActiveSheet.Range("B11:K11").Select
Selection.AutoFilter 1, ActiveSheet.Range("C1").Value
End If
End If
End Sub
Thanks
Raj
I am using the below code to change the filter in range "B11:K11" based on a dropdown in cell C1 and it is working fine. I want to add another event in the same code targeting range "G12:G31" and "I12:I31" triggering MsgBox "Test".
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$1" Then
If Range("C1") = "All" Then
ActiveSheet.AutoFilterMode = False
Else
ActiveSheet.AutoFilterMode = False
ActiveSheet.Range("B11:K11").Select
Selection.AutoFilter 1, ActiveSheet.Range("C1").Value
End If
End If
End Sub
Thanks
Raj