Hello experts!!!!!!
I am new to vba and I want to try out filtering data.
I have columm which contains almost 40000 rows. basically it has Dates and months.
I want two TextBox and three command Buttons to filter my data. 1st to filter according to month and then 2nd to filter according to date. 3rd button to get all data back.
I can do it by using filter but i want to that by command.
I have tried to filter according to month but wasn't sucessful.
the code I used :
Private Sub CommandButton21_Click()
' filter data
'
'
Dim i As Date
i = TextBox21.Value
Range("A5").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.AutoFilter
Range("A5").Select
ActiveSheet.Range("$A$5:$A$35041").AutoFilter Field:=1, Operator:= _
xlFilterValues, Criteria2:=Array(1, "i")
End Sub
Please help me out!!!!!
Bookmarks