My Current code is as under,
The issue,Code:Sub deleterow() Dim dt As Date, x As Date Sheets("raw").Select x = Range("O2") [O:O].AutoFilter Field:=1, Criteria1:=x 'filters on column O where cell contains some date With ActiveSheet.AutoFilter.Range .Offset(1).Resize(.Rows.Count - 1).SpecialCells(xlCellTypeVisible).Delete End With ' ActiveSheet.AutoFilterMode = False 'turns off autofilter End Sub
1) It filters date but does not recognise the date format as dd-mmm-yy (filter mode shows criteria equals m/d/yyyy)
2) When I select date manually, rest of the code gets executed to delete rows, but still it leaves first row as undeleted where the criteria is also matched.
What modification, do i need to make, and in which part of the macro?




Reply With Quote
Bookmarks