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: 181
Default xl2002 - AutoFilter from Criteria from Other Sheet...

I am trying to apply an AutoFilter to records on "Sheet 2" using criteria
chosen from 7 lists on "Sheet 1"

The filtering works if each criteria contains a value, but if one is left
blank no records are shown.

I have tried adding the value "(all)" as a default into the lists on Sheet 1
but that doesn't work either.

How can I skip 'blank' entries when filtering using code? (current code
below)

Thanks

Trevor

Sub FilterResult()

myFilter = Array("ctDescription", "ctMarket", "ctPOB", "ctChannel", _
"ctCategory", "ctQuality", "ctCompetition")

For i = 0 To 6
x = myFilter(i)
Selection.AutoFilter Field:=i + 1, Criteria1:=Range(x), _
VisibleDropDown:=False
Next i

End Sub
 
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
XL2002 - VLOOKUP with variable Sheet Name Trevor Williams Excel Worksheet Functions 3 July 29th 08 05:33 PM
XL2002 - Offset function on inactive sheet... Trevor Williams Excel Programming 6 July 26th 06 09:55 AM
AutoFilter criteria Mark Excel Programming 1 November 2nd 05 12:08 PM
AutoFilter Pull Criteria from one sheet and custom filter on other dtg_denver Excel Programming 8 August 20th 05 10:47 PM
Use sheet name as search string or autofilter criteria Magar Excel Programming 1 November 14th 03 01:06 PM


All times are GMT +1. The time now is 02:24 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"