Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ken Ken is offline
external usenet poster
 
Posts: 590
Default Auto Filter - Multiple Conditions?

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




  #2   Report Post  
Posted to microsoft.public.excel.misc
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




  #3   Report Post  
Posted to microsoft.public.excel.misc
Ken Ken is offline
external usenet poster
 
Posts: 590
Default Auto Filter - Multiple Conditions?

Ivor ... Unfortunately, I can not provide a sample ... Temp works find for my
Plant as I only needed 1 Filtered condition ... However, a sister Plant
needed more than 2 conditions for Macro Button to work as I have it working.
Solution was to disable this Button on sister Temp.

Above said ... Thank you for your explanation & for supporting these boards
.... Kha

"Ivor Davies" wrote:

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




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
Auto filter for multiple columns Khardy3352 Excel Discussion (Misc queries) 2 January 25th 09 05:16 AM
Search multiple cells with conditions, sum and auto populate! Desperately seeking hammer !! Excel Worksheet Functions 3 August 18th 07 12:20 AM
Summary Counts Functions to filter multiple conditions Kamlesh Excel Worksheet Functions 2 March 14th 06 10:51 AM
How do I filter with multiple conditions in one field? TJ Excel Discussion (Misc queries) 4 September 28th 05 11:16 PM
Auto Filter Multiple Selections sbrimley Excel Discussion (Misc queries) 5 May 2nd 05 07:32 PM


All times are GMT +1. The time now is 05:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"