Thread
:
Filtering columns within VB
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
Filtering columns within VB
have you tried having the macro copy the advanced filter to a named range.
--
Don Guillett
SalesAid Software
"Darin Kramer" wrote in message
...
HI guys,
an extract of my
vb
is below:
With Sheets("Master").Range("A2:fs168")
.AutoFilter Field:=11, Criteria1:="Y"
.AutoFilter Field:=39, Criteria1:="N"
.AutoFilter Field:=40, Criteria1:="N"
.SpecialCells(xlCellTypeVisible).Copy _
Sheets("Results").Range("a2")
Basically I need to obtain all instances of Y in field 11, and ANY
Instance of N in field 39 and 40 (and other fields)
So for eg if a record has the following properties :
11 - Y
39 - Y
40 - n
The above filter will not work as within field 39 there is a Y. I need
the filter to be OR, ie if a N within 39 or 40 then show it.
I cant use advanced filters as I need this to be run through
VB
and to
have this copied to another sheet (plus couldent get advanced filters to
produce the result...?)
Too complicated...???
Thanks
D
*** Sent via Developersdex
http://www.developersdex.com
***
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett