Thread: Autofilter
View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
John John is offline
external usenet poster
 
Posts: 2,069
Default Autofilter

apologies if this is unclear...

"John" wrote:

Nigel, that gives me rows that have a column 8 value less than zero and a
column 18 that doesn't equal 8... I would like it to show, for example, if a
row had a postive value in column 8 and a value of 7 in column 18 as well.

"Nigel" wrote:

I did get it wrong - your last post says "I want to show rows that don't
equal 8 and are less than zero"

so use.....

Sheets("CORPS").Select
Selection.AutoFilter Field:=14, Criteria1:="<0", Operator:=xlAnd
Selection.AutoFilter Field:=18, Criteria1:="<8"




--
Cheers
Nigel



"John" wrote in message
...
If I want to filter the data so that any row that has a value greater than

0
in column 14 OR does not have a value of 8 in column 18... why does this

code
not work... It gives me only those rows with values less than zero in

column
14 and hides every row that does not equal 8 in column 18!

Sheets("CORPS").Select
Selection.AutoFilter Field:=14, Criteria1:="<0", Operator:=xlOr
Selection.AutoFilter Field:=18, Criteria1:="<8"

Thanks for the help