filtering greater than and less than < x >

rob179994

New member
Joined
Apr 9, 2014
Messages
17
Reaction score
0
Points
0
Hi

I am having trouble filtering greater than in one range and less than in another range at the same time. If i separate them, they work separately but not at the same time. What is going on and can anyone help. Here is the code below.

Code:
Sub Filtergreater()

Sheets("FolderSort").Select
    ActiveSheet.AutoFilterMode = False
    Range("I4:I368").AutoFilter field:=1, Criteria1:=">" & Sheets("FrontPage").Range("E17").Value
    Range("J4:J368").AutoFilter field:=1, Criteria1:="<" & Sheets("FrontPage").Range("K17").Value

End Sub


Thanks in advance.
 
Last edited by a moderator:

Bob Phillips

Super Moderator
Staff member
Joined
Mar 21, 2011
Messages
1,940
Reaction score
0
Points
36
Excel Version(s)
O365
Code:
Sub Filtergreater()

Sheets("FolderSort").Select
    ActiveSheet.AutoFilterMode = False
    Range("I4:J368").AutoFilter field:=1, Criteria1:=">" & Sheets("FrontPage").Range("E17").Value
    Range("I4:J368").AutoFilter field:=2, Criteria1:="<" & Sheets("FrontPage").Range("K17").Value


End Sub
 
Top