Filter With VB Code

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am attempting to filter a set of data based upon the values in other cells
within the worksheet. I have no VB knowledge so I have recorded a macro and
ammended its VB code :

Columns("A:H").Select
Selection.AutoFilter
Selection.AutoFilter Field:=4, Criteria1:=Range("L8"), Operator:=xlAnd
Selection.AutoFilter Field:=6, Criteria1:=Range("M8"), Operator:=xlAnd

How do I make the 3rd line look for a value above cell the value within cell
"L8" it works fine when looking for values that equal it, but wherever I put
the greater than sign an error message is generated.

Thanks,
Cam.
 
Back
Top