Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2006

Tip: Looking for answers? Try searching our database.

Custom Filter using more than two 'OR'

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GLT - 24 Jan 2006 17:46 GMT
Hi,

I am trying to run a custom filter on a column, returning results if any of
three values are found in a cell.  

For example, if "MO" or "TU" or "WE" are found.

However this function will not support more than one 'OR' in the code.

This is the code I tried to use:

      Selection.AutoFilter Field:=1, Criteria1:="=ALL", Operator:=xlOr, _
      Criteria2:="=" & myDay2, Operator:=x1or, Criteria3:="= MT"

Is this how this Autofilter is setup to work (only one 'OR') or is my code
wrong?

Any assistance would be greatly appreciated.

Thanks,
GLT.
Tom Ogilvy - 24 Jan 2006 18:45 GMT
Yes, it only supports two criteria.

You will either need to us an advanced filter or put in a dummy column that
has a formula that determines if the row should be visible or not and filter
on that column.

Signature

Regards,
Tom Ogilvy

> Hi,
>
[quoted text clipped - 17 lines]
> Thanks,
> GLT.
somethinglikeant - 24 Jan 2006 18:59 GMT
Also,

On this I have found the Database functions to be very useful:-
=DSUM   =DSUMIF, etc.

somethinglikeant
Tom Ogilvy - 24 Jan 2006 19:07 GMT
The advanced filter is the filtering equivalent to the D functions (there is
no DSUMIF I am aware of).

Signature

Regards,
Tom Ogilvy

> Also,
>
> On this I have found the Database functions to be very useful:-
> =DSUM   =DSUMIF, etc.
>
> somethinglikeant
somethinglikeant - 25 Jan 2006 18:49 GMT
GLT - 20 Mar 2006 19:21 GMT
Hi Tom,

How do I set up an advanced filter in VBA?

I tried to do it via the help and I can't make any sense out of it ...

Chrees

> Yes, it only supports two criteria.
>
[quoted text clipped - 24 lines]
> > Thanks,
> > GLT.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.