PC Review


Reply
Thread Tools Rate Thread

Custom filtering in excel 2003 with more than 2 multifilter option

 
 
=?Utf-8?B?R2lidSBKb2huIEdlb3JnZQ==?=
Guest
Posts: n/a
 
      24th May 2007
I am working on a macro to filter out a column in Excel 2003. but i am
facing a problem in the Custom option of Auto filter, it can check for only 2
values using And / Or

Selection.AutoFilter Field:=5, Criteria1:="=a",
Operator:=xlOr,Criteria2:="=b"

Is there any way to increase this to more than 2 values?

I have also tried
Selection.AutoFilter Field:=5, Criteria1:="=a", Operator:=xlOr,
Criteria2:="=b", Operator :=xlOr,Criteria3:="=c"

but still no joy.

I have also tried putting the Criteria as an array, as used in excel 2007,
but those dont work in excel 2003

ActiveSheet.Range("$A$1:$AP$437").AutoFilter Field:=2, Criteria1:=Array(
"a", "b", "c") , Operator:=xlFilterValues

Is there any solution for this?
 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      24th May 2007
Not that I know of.

I tend t0 create a helper column with a formula that checks all possible
options and outputs TRUE or FALSE, and filter by the helper column.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Gibu John George" <Gibu John (E-Mail Removed)> wrote in
message news:79E03C25-88BA-4C02-90B1-(E-Mail Removed)...
> I am working on a macro to filter out a column in Excel 2003. but i am
> facing a problem in the Custom option of Auto filter, it can check for
> only 2
> values using And / Or
>
> Selection.AutoFilter Field:=5, Criteria1:="=a",
> Operator:=xlOr,Criteria2:="=b"
>
> Is there any way to increase this to more than 2 values?
>
> I have also tried
> Selection.AutoFilter Field:=5, Criteria1:="=a", Operator:=xlOr,
> Criteria2:="=b", Operator :=xlOr,Criteria3:="=c"
>
> but still no joy.
>
> I have also tried putting the Criteria as an array, as used in excel 2007,
> but those dont work in excel 2003
>
> ActiveSheet.Range("$A$1:$AP$437").AutoFilter Field:=2, Criteria1:=Array(
> "a", "b", "c") , Operator:=xlFilterValues
>
> Is there any solution for this?



 
Reply With Quote
 
Shailesh Shah
Guest
Posts: n/a
 
      24th May 2007

You can use Advancefilter method using criteria Range in a worksheet.
See more details in VBA Help.

Regards,
Shah Shailesh
http://in.geocities.com/shahshaileshs/
(Excel Add-ins Page)

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Filtering - Limitations of the "Contains" option Timothyg787 Microsoft Excel Worksheet Functions 7 22nd Jun 2008 11:29 PM
Bring Back the Custom Forms Option in Outlook 2003 =?Utf-8?B?am1yMDkwOA==?= Microsoft Outlook Form Programming 1 26th Oct 2006 09:16 PM
My custom fill color option is not in excel how do i get it worki. =?Utf-8?B?cGFybQ==?= Microsoft Excel Misc 2 3rd May 2006 01:26 PM
Re: custom filtering in Excel 2002 Ken Wright Microsoft Excel Misc 0 13th Nov 2003 05:19 PM
outlook 2003 custom rules and spam filtering juan Microsoft Outlook 0 24th Oct 2003 07:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:16 PM.