xcruc1at3r
Member
Need to modify the macro from deleting duplicates based on 2 criteria 1st the duplicate and 2nd criteria dd/mm/yy
for e.g
Columns
A serial B Names B C quantity D Quality E Category ....G DATE..etc etc....
Should search for duplicates in Column B & for Dates In G
If found
1 Grapes 12 B+ ....... 19/08/11<<< previous Status
4 Grapes 30 A+.........20/08/11 << Current Status
Should delete the Previous Status....
Macro is as below need to modify :
Sub DeleteDups()
Dim x As Long
Dim LastRow As Long
LastRow = Range("B65536").End(xlUp).Row
For x = LastRow To 1 Step -1
If Application.WorksheetFunction.CountIf(Range("B1:B" & x), Range("B" & x).Text) > 1 Then
Range("B" & x).EntireRow.Delete
End If
Next x
End Sub
would really appreciate
for e.g
Columns
A serial B Names B C quantity D Quality E Category ....G DATE..etc etc....
Should search for duplicates in Column B & for Dates In G
If found
1 Grapes 12 B+ ....... 19/08/11<<< previous Status
4 Grapes 30 A+.........20/08/11 << Current Status
Should delete the Previous Status....
Macro is as below need to modify :
Sub DeleteDups()
Dim x As Long
Dim LastRow As Long
LastRow = Range("B65536").End(xlUp).Row
For x = LastRow To 1 Step -1
If Application.WorksheetFunction.CountIf(Range("B1:B" & x), Range("B" & x).Text) > 1 Then
Range("B" & x).EntireRow.Delete
End If
Next x
End Sub
would really appreciate