LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Filtering columns within VB



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 ***
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
filtering rows across several columns Mike H Excel Discussion (Misc queries) 0 March 23rd 10 01:09 PM
Filtering Columns Sher Excel Discussion (Misc queries) 1 December 13th 06 02:32 PM
filtering columns-left nav agrillo Charts and Charting in Excel 0 December 1st 05 08:40 PM
Filtering on multiple columns wammer Excel Discussion (Misc queries) 4 August 29th 05 11:21 PM
Filtering by Columns carl Excel Worksheet Functions 1 May 4th 05 09:01 PM


All times are GMT +1. The time now is 10:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"