Hey now..!!
Below is sample code I'm working with.
It replaces duplicate values in a single column only, leaving the 1st row of duplicates.
I'm tryin' to make this work over several columns - columns B thru G to be exact.
Any suggestions or examples..!!
Thanks in advance..!!
jcw5107
Sub ReplaceDups()
Dim RowNdx As Long
Dim ColNum As Integer
ColNum = Selection(1).Column
For RowNdx = Selection(Selection.Cells.Count).Row To _
Selection(1).Row + 1 Step -1
If Cells(RowNdx, ColNum).Value = Cells(RowNdx - 1, ColNum).Value Then
Cells(RowNdx, ColNum).Value = "----"
End If
Next RowNdx
End Sub
Below is sample code I'm working with.
It replaces duplicate values in a single column only, leaving the 1st row of duplicates.
I'm tryin' to make this work over several columns - columns B thru G to be exact.
Any suggestions or examples..!!
Thanks in advance..!!
jcw5107
Sub ReplaceDups()
Dim RowNdx As Long
Dim ColNum As Integer
ColNum = Selection(1).Column
For RowNdx = Selection(Selection.Cells.Count).Row To _
Selection(1).Row + 1 Step -1
If Cells(RowNdx, ColNum).Value = Cells(RowNdx - 1, ColNum).Value Then
Cells(RowNdx, ColNum).Value = "----"
End If
Next RowNdx
End Sub