View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ivor Davies Ivor Davies is offline
external usenet poster
 
Posts: 17
Default Auto Filter - Multiple Conditions?

The custom autofilter can only handle 2 conditions. To identify data with
more than 2 conditions you need to resort to formula's. Some options are the
INDEX and MATCH functions, or you can use the conditional sum wizard to
summarise data based on multiple conditions. These functions will only
summarise data, and not produce a filtered list.

Alternatively if you really need a seperate list rather than summarised data
you could develop some macros. Immediate thoughts are to have a data
worksheet with a macro that sorts different fields based on a set criteria
and copys this 'sorted' data over to a new worksheet.

Can you provide a sample of data and more of a description of what you're
trying to do?

"Ken" wrote:

Excel2003 ... Protected WorkSheet ... I do not know Macro Code ... I record
Code then do some creative cut/paste.

Issue ... I have a template with "Auto-Filter" Switches set on every Col. I
use a recorded Macro to accomplish my task (2 Conditions) ... However, now I
need to Filter on more than 2 Conditions ... My present Macro looks like:

Sub A_Test_Filter()
'
' A_Test_Filter Macro

ActiveSheet.Unprotect
Selection.AutoFilter Field:=2, Criteria1:="=0182", Operator:=xlOr, _
Criteria2:="=2321"
Range("C2").Select
End Sub

I have Macro Buttons & I need the Auto-Filter Switches so is there a way to
accomplish this with Macro Code that will not disrupt the present workings of
my Template?

Thanks ... Kha