Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to create a macro that will filter column B which is a listing of
dates from last year, same month. So, for instance this months report contains dates listed from March 2007. I need to filter for dates that are less than todays date. So, anything from the 19th of 2007 forward would need to be deleted. This will change every day. Tomorrow will need the 20th forward rows deleted. This is what I have from trying to create the macro, but I need the date to be dynamic. What I have will only select accounts I specify today, and will only delete the rows I manually selected after the filter. Can anyone help me with this? Sub Deletedays() ' Deletefromtodaysdateforward Macro ' Columns("B:B").Select Selection.AutoFilter Selection.AutoFilter Field:=1, Criteria1:="3/18/2007", Operator:=xlAnd Rows("189:302").Select Selection.Delete Shift:=xlUp End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro filter | Excel Discussion (Misc queries) | |||
Filter Macro | Excel Programming | |||
Need macro to filter, create tab on filter and copy/paste | Excel Programming | |||
Need macro to filter, create tab on filter and copy/paste | Excel Programming | |||
Need a filter macro | Excel Discussion (Misc queries) |