I have column of dates, which is an output from a database. There is a macro that filters on this date which is meant to show all dates older than 14 days from current date excluding nulls. The filter when applied filters the entire sheet and shows nothing. When I take off the - 14 I do get dates, I have tried even using alt a, e, f to ensure that the column is the correct format, but no luck.
Here is my code snippet:
ActiveSheet.UsedRange.AutoFilter Field:=34, Criteria:="<>NULL", _
Operator:=xlAnd, Criteria2:="<" & Now()-14
I have tried changing the criteria2 to "<" & Date - 14 & "# 00:00:00 AM#"
Please help