Autofilter with date field

  • Thread starter Thread starter gabch
  • Start date Start date
G

gabch

Hi,

In Autofilter, how to handle between the date format in cells and input
date format(for criteria)?
For example, date format in cells is d/m/yy but the input date format
is dd-mmm-yyyy.

Thx
 
Hi Gabch,

Try something like:

Range("A1").AutoFilter Field:=1, _
Criteria1:=">" & CLng(Range("E1").Value)

or

Range("A1").AutoFilter Field:=1, _
Criteria1:=">" & CLng(DateValue("01/12/1944"))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top