shba,

Thank you for using code tags
I think the full code would look like this:
Private Sub Worksheet_Change(ByVal Target As Range)
    
    Dim Rng As Range, Dn As Range, rngFound As Range
    Dim K
    Dim col
    Dim c As Integer
    
    Set rngFound = Target.Parent.Rows(1).Find("IP", , xlValues, xlWhole)
    If rngFound Is Nothing Then Exit Sub
    If Target.Column = rngFound.Column 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