Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Advanced Filtering problem

When I try this code, all of rows 2 through rows 8 on the worksheet
"Test" are filtered and no longer visible.
I would have expected rows 3 through 4 and 6 through 7 to be filtered.
Can someone tell me what I am doping incorrectly?

tia
bob

Sheets("Test").Range("D1:D8").AdvancedFilter _
Action:=xlFilterInPlace, _
CriteriaRange:=Sheets("zzzzWorkSpaceSheet").Range( "A1:A5"), _
Unique:=False

Sheet:Test contains this data in Column D starting at row 1
HEADER
r
d
f
r
g
h
r

Sheet:zzzzWorkSpaceSheet contains this data in Column A starting at
row 1
Crit
d
f
g
h
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Advanced Filtering problem

George,

Your zzzzWorkSheet should have this format:

In cells A1 to D1, enter the word "HEADER" (assuming that is really the
header name in the other sheet).
In A2 enter "d"
In B3 enter "f"
In C4 enter "g"
and in D5 enter "h"

To filter "d" OR "f" OR "g" OR "h" as you are doing here each criteria has
to be on a different row. Putting them in the same row is a logical AND.
Having them all in the same column as you did... well, I'm not sure what it
means, but it doesn't work.

hth,

Doug


wrote in message
...
When I try this code, all of rows 2 through rows 8 on the worksheet
"Test" are filtered and no longer visible.
I would have expected rows 3 through 4 and 6 through 7 to be filtered.
Can someone tell me what I am doping incorrectly?

tia
bob

Sheets("Test").Range("D1:D8").AdvancedFilter _
Action:=xlFilterInPlace, _
CriteriaRange:=Sheets("zzzzWorkSpaceSheet").Range( "A1:A5"), _
Unique:=False

Sheet:Test contains this data in Column D starting at row 1
HEADER
r
d
f
r
g
h
r

Sheet:zzzzWorkSpaceSheet contains this data in Column A starting at
row 1
Crit
d
f
g
h



Reply
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
Advanced Filtering [email protected] Excel Discussion (Misc queries) 2 August 20th 07 12:20 AM
Advanced filtering glassjo Excel Discussion (Misc queries) 1 September 25th 05 08:09 PM
advanced filtering in XLS Tina Excel Worksheet Functions 1 September 3rd 05 01:50 PM
advanced filtering spence[_3_] Excel Programming 2 January 21st 04 02:03 AM
Advanced Filtering in VBA John Pierce Excel Programming 1 October 8th 03 09:51 AM


All times are GMT +1. The time now is 12:37 PM.

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"