Hey I have this rule which highlights duplicates in a row in different colors so if you have a row that is

1
1
1
2
2
3
1
3

All the one's will be blue 2's red and 1's white. Currently the rule below only works on column A. All my columns have headers, and I need it to instead of working on column A work on the columns with header names I choose.
Anyone have any idea how this can be accomplished??

Private Sub Worksheet_Change(ByVal Target As Range)
Dim Rng As Range, Dn As Range
Dim K
Dim col
Dim c As Integer
If Target.Column = 1 Then
Set Rng = Range(Range("A1"), Range("A" & Rows.Count).End(xlUp))
With CreateObject("scripting.dictionary")
.CompareMode = vbTextCompare
For Each Dn In Rng
If Not .Exists(Dn.Value) Then
.Add Dn.Value, Dn
Else
Set .Item(Dn.Value) = Union(.Item(Dn.Value), Dn)
End If
Next
col = Array(3, 50, 6, 7, 8, 34, 35, 38, 39, 50, 45, 46)
For Each K In .keys
If .Item(K).Count > 1 Then
c = IIf(c = 12, 0, c)
.Item(K).Interior.ColorIndex = col(c)
c = c + 1
End If
Next K
End With
End If
End Sub