Excelophobe
New Member
Hi all - please help.
I need a macro that filters a table based on whether the date in the DATE column is equal to today's date or in the future.
Essentially what i need to do is to filter out all entries that are due by today's date or in future, and delete them. What i should be left with are all entries from yesterday and further back in time.
I tried to record a simple macro that selects Custom Filter on DATE column (column 4) and selects "is after or equal to" and today's date from the calendar. Today's date has to be selected/automated as this is for a recurring report that is to be produced on multiple days of the week.
This code does not return the required data. Even though i recorded the correct procedure while recording the macro, the macro itself does not pick up what options i have selected in Custom Filter.
Please help!
Best regards,
E.
I need a macro that filters a table based on whether the date in the DATE column is equal to today's date or in the future.
Essentially what i need to do is to filter out all entries that are due by today's date or in future, and delete them. What i should be left with are all entries from yesterday and further back in time.
I tried to record a simple macro that selects Custom Filter on DATE column (column 4) and selects "is after or equal to" and today's date from the calendar. Today's date has to be selected/automated as this is for a recurring report that is to be produced on multiple days of the week.
Code:
ActiveSheet.ListObjects("Table6").Range.AutoFilter Field:=4, Criteria1:= _
">=24/04/2015", Operator:=xlAnd
This code does not return the required data. Even though i recorded the correct procedure while recording the macro, the macro itself does not pick up what options i have selected in Custom Filter.
Please help!
Best regards,
E.