Bug in the Advance Filter in Excel 2010 v. 14.0

I use Latin America regional settings.

Using a macro, when the advance filter in a cell is set to ">=30/11/2013" gives no results.

The results are ok when I swapped day and month: ">=11/30/2013"

October 28th, 2013 6:22pm

Regardless of your local settings, VBA uses US date format. So if you want to specify a literal date in VBA, you must do so in mm/dd/yyyy format, or in the internationally unambiguous yyyy/mm/dd format:

">=2013/11/30"

Another option is referring to the numeric equivalent of the date:

">=" & CLng(DateSerial(2013, 11, 30))

Free Windows Admin Tool Kit Click here and download it now
October 28th, 2013 6:39pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics