Hi,
How can I make the following code so that it filters the sheet from column 1 to column 9. At present it filters the sheet only from column 3.
Any help on this would be kindly appreciated.
How can I make the following code so that it filters the sheet from column 1 to column 9. At present it filters the sheet only from column 3.
Any help on this would be kindly appreciated.
Code:
<code>Set mylist = ActiveSheet.ListObjects
If mylist.Count Then ' A List or Table Object is used
tblname = mylist(1).Name
If Cells(rownum, colnum).Value = "" Then ' No filter choice
mylist(tblname).Range.AutoFilter Field:=3
GoTo cleanup
ElseIf caret Then
mylist(tblname).Range.AutoFilter Field:=3, _
Criteria1:=crit1, Operator:=optype, Criteria2:=crit2
GoTo cleanup
Else
mylist(tblname).Range.AutoFilter Field:=3, _</code>