20rin
12-10-2013, 12:27 AM
Guys what is wrong here???????
F45-F48 is links for checkboxes
Sub Macro4()
'
'Cola
'Pepsi
'AMG
'Other
Dim c1 As String
Dim c2 As String
Dim c3 As String
Dim c4 As String
If Range("F45") = True Then
c1 = "Cola"
Else
c1 = ""
End If
If Range("F46") = True Then
c2 = "Pepsi"
Else
c2 = ""
End If
If Range("F47") = True Then
c3 = "AMG"
Else
c3 = ""
End If
If Range("F48") = True Then
c4 = "Other"
Else
c4 = ""
End If
ActiveSheet.Range("$A$51:$W$828").AutoFilter Field:=9, Criteria1:=Array(c1, c2, c3, c4)
End Sub
F45-F48 is links for checkboxes
Sub Macro4()
'
'Cola
'Pepsi
'AMG
'Other
Dim c1 As String
Dim c2 As String
Dim c3 As String
Dim c4 As String
If Range("F45") = True Then
c1 = "Cola"
Else
c1 = ""
End If
If Range("F46") = True Then
c2 = "Pepsi"
Else
c2 = ""
End If
If Range("F47") = True Then
c3 = "AMG"
Else
c3 = ""
End If
If Range("F48") = True Then
c4 = "Other"
Else
c4 = ""
End If
ActiveSheet.Range("$A$51:$W$828").AutoFilter Field:=9, Criteria1:=Array(c1, c2, c3, c4)
End Sub