View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Cam Cam is offline
external usenet poster
 
Posts: 165
Default Filter With VB Code

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.