exceluser9
Active Member
- Joined
- Jun 27, 2015
- Messages
- 388
Hi Team,
I have recorded below macro i want to select previous day date and delete all the records but the date remains same when the macro was recorded, Please could you help me with the code to delete previous day records in column X1 and their associated rows
Thanks
Sheets("mastertracker").Select
Cells.Select
Range("T1").Activate
Selection.AutoFilter
Range("X1").Select
ActiveSheet.Range("$A$1:$AY$383").AutoFilter Field:=24, Operator:= _
xlFilterValues, Criteria2:=Array(2, "6/14/2019")
Cells.Select
Range(Selection, Selection.End(xlUp)).Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Delete Shift:=xlUp
Range("A1").Select
I have recorded below macro i want to select previous day date and delete all the records but the date remains same when the macro was recorded, Please could you help me with the code to delete previous day records in column X1 and their associated rows
Thanks
Sheets("mastertracker").Select
Cells.Select
Range("T1").Activate
Selection.AutoFilter
Range("X1").Select
ActiveSheet.Range("$A$1:$AY$383").AutoFilter Field:=24, Operator:= _
xlFilterValues, Criteria2:=Array(2, "6/14/2019")
Cells.Select
Range(Selection, Selection.End(xlUp)).Select
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Delete Shift:=xlUp
Range("A1").Select
Last edited: