filtering

  • Thread starter Thread starter gerry405
  • Start date Start date
G

gerry405

Hi everyone

Can anyone show me how to filter on a column containing dates in th
format of 21/04/59 being (21st April 1959), I set about recording
macro that first put a filter on the worksheet, then I selected th
column with dates in and go to custom filter then select "equal to o
lesser than" and key in the value 30/09/2005, but all that happens whe
I run this new macro is I get blank lines ...

If you try it your self on a col with some date's you'll see fo
yourself and perhaps be as disappointed in excel as me so far..

code below

Sub less_than()
'
' less_than Macro
' Macro recorded 07/10/2005 by SGUHT
'
' Keyboard Shortcut: Ctrl+k
'
Selection.AutoFilter
Range("U1").Select
Selection.AutoFilter Field:=21, Criteria1:="=30/09/2005", Operator:= _
xlAnd
End Su
 
Back
Top