How to blank out cells with duplicate values?
Some VBA
Sub test()
Dim iLastRow As Long
Dim i As Long
iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
For i = iLastRow To 2 Step -1
If Application.CountIf(Columns(1), Cells(i, "A")) 1 Then
Cells(i, "A").Delete Shift:=xlUp
End If
Next i
End Sub
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
"Bleu_808" wrote in message
oups.com...
Okay - after an hour on trying to work on what I thought was an easy
task 0 I must ask for help!
My column A is a list of order numbers, each order is separated by a
blank row...
ex:
1234
1234
1234
1234
4321
4321
4321
6789
6789
What I would like to do is delete the duplicate order numbers, without
affecting the rest of the row. I thought this might be a simple if
statement, but no. Any ideas?
Thanks in advance - Bleu
|