Date format is not picked up correctly while filtering

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In Excel Macros I have taken date format as DD-MMM-YY and assigned to a
variable and same picked up variable for filtering it is not possible to
filter?? Can anybody help me out ..... Please.........
 
Try this instead

Dim sDate As String

sDate = Format(Date,"dd-mmm-yy")
Selection.AutoFilter Field:=1, Criteria1:="<=" & sDate

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Back
Top