Hi,
i have the following code
Sub CartCtype()
With Sheets("input_sheet")
Application.ScreenUpdating = False
bottomA = .Range("A" & .Rows.Count).End(xlUp).Row
For x = 2 To bottomA
If .Cells(x, "A") = "10*" Then
.AutoFilter field:=1, Criteria1:="10_C*"
ElseIf .Cells(x, "A") = "20*" Then
.AutoFilter field:=1, Criteria1:="20_C*"
End If
Next x
End With
End Sub
What I want is, by clicking on the CartCType button, the macro will check in columns A if it contain 10*...if it does, then filter it with only this criteria 10_C*
if it does contain 20, then filter if with 20_C*
Any help??
Bookmarks