View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Mulitple Filter Selection

A sheet can only have one filter applied. If you want multiple areas, use multiple sheets, or
combine the ranges and use multiple criteria (on different columns)

HTH,
Bernie
MS Excel MVP


"MrRJ" wrote in message
...
Hi,
I need to strenghten my code to allow the users to select 2 areas (or
columns) in which the filter would operate. I was able to do one, but can't
find a way to do more than one.

'
Dim Message, Title, MyValue
Dim ExactDate As Date
Dim ExactCriterion As String
Message = "Please Enter the Period, (00)"
Title = "Title"
MyValue = InputBox(Message, Title)

ExactCriterion = Format(ExactDate, "mm/dd/yy")

Range("Headers").AutoFilter
Range("Headers").AutoFilter Field:=6, Criteria1:=MyValue

Please help. Thanks.