filter cretaria in VBA

G2K

Active Member
Joined
May 29, 2009
Messages
355
Hi All,

I need to use criteria in autofilter in VBA where criiteria is <>#N/A. i am using folloing code-

Rng.AutoFilter Field:=14, Criteria1:="<>"East, Operator:=xlAnd, Criteria2:="<>" & "#N/A"

but the next criteria is not working showing value blank instead of #N/A

Please help me..........

Thanks
 

Some videos you may like

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

xld

Banned
Joined
Feb 8, 2003
Messages
5,378
Your code looks wrong

Code:
Rng.AutoFilter Field:=14, Criteria1:="<>East", Operator:=xlAnd, Criteria2:="<>#N/A"
 

Watch MrExcel Video

Forum statistics

Threads
1,118,168
Messages
5,570,605
Members
412,330
Latest member
carlosjw
Top