Excel auto filtering to find a range of dates in a list
Hi Candy,
If you're using the Custom filter box, for February use 2/1/2006 for the
first entry and 3/1/2006 for the second. If you're using VBA you can do it
this way:
.AutoFilter Field:=3, Criteria1:="=" & CDate(Range("M1")), _
Operator:=xlAnd, Criteria2:="<" & CDate(Range("N1"))
where M1 and N1 hold your dates. Or:
.AutoFilter Field:=3, Criteria1:="=" & CDate("2/1/06"), _
Operator:=xlAnd, Criteria2:="<" & CDate("3/1/06")
For the manual method you need the full year spelled out.
CHORDially,
Art Farrell
"Candy" wrote in message
...
Please Help! I've tried all morning to auto filter a range of dates using
"greater than or equal to" and/or "but less than." I've tried every
scenario
the auto filter offers with no luck. Out of the twelve months listed for
birthdays, I simply want to get all of the February birth dates only. So,
for
example, I choose "is greater than or equal to 1/1 and/or "is less than or
equal to 3/1. With those perimeters chosen, I would expect to get all of
the
2/ or February dates!
Nothing I do gets this list filtered. I'm soooooo frustrated! Can anyone
help?
|