M
Mslady
I have this code already that deletes rows based on criteria "3/25/2005"
in column A.
And it works exellently.
1. Is there a way to add functionality to this autofilter code to
delete duplicate rows by checking column A for duplicate values and
deleting the row?
2. I would like to add a second criteria to delete row with
"12/31/2005" in column A. How do i make this happen?
Here is what i have: Any ideas will be mucho appreciated
Code:
--------------------
Worksheets("MyTable").Select
With ActiveSheet
If .AutoFilterMode = False Then .Cells(1, 1).AutoFilter
.Range("A1").AutoFilter Field:=1, Criteria1:=#3/25/2005#
.Range("A1").CurrentRegion.Offset(1, 0).SpecialCells _
(xlCellTypeVisible).EntireRow.Delete
.AutoFilterMode = False
End With
in column A.
And it works exellently.
1. Is there a way to add functionality to this autofilter code to
delete duplicate rows by checking column A for duplicate values and
deleting the row?
2. I would like to add a second criteria to delete row with
"12/31/2005" in column A. How do i make this happen?
Here is what i have: Any ideas will be mucho appreciated
Code:
--------------------
Worksheets("MyTable").Select
With ActiveSheet
If .AutoFilterMode = False Then .Cells(1, 1).AutoFilter
.Range("A1").AutoFilter Field:=1, Criteria1:=#3/25/2005#
.Range("A1").CurrentRegion.Offset(1, 0).SpecialCells _
(xlCellTypeVisible).EntireRow.Delete
.AutoFilterMode = False
End With