title: Trying to find Duplicate comma delimited texts in each cell of a column
body: <p>I have the following macro that I got from someone, and trying to modify it to suit my purpose.</p>
  <p>I'm trying to alter this macro to find and highlight cells that have duplicate values within each cell,
  for example, it should highlight B62 and B63 (green),
  and color font red the duplicate values (i.e. B_HWY_1010 in B62, and B_HWY_1015 in B63)</p>
  <p><a href="https://i.stack.imgur.com/RJUYW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RJUYW.png" alt="enter image description here" /></a></p>
  <pre><code>Sub Dupes()
    Dim d As Object
    Dim a As Variant, itm As Variant
    Dim i As Long, k As Long
    Dim rng As Range
    Dim bColoured As Boolean
   
    Set d = CreateObject(&quot;Scripting.Dictionary&quot;)
    Set rng = Range(&quot;B1&quot;, Range(&quot;B&quot; &amp; Rows.Count).End(xlUp))
    a = rng.Value
    For i = 1 To UBound(a)
      For Each itm In Split(a(i, 1), &quot;,&quot;)
        d(itm) = d(itm) + 1
      Next itm
    Next i
    Application.ScreenUpdating = False
    For i = 1 To UBound(a)
      k = 1
      bColoured = False
      For Each itm In Split(a(i, 1), &quot;,&quot;)
        If d(itm) &gt; 1 Then
          If Not bColoured Then
            rng.Cells(i).Interior.Color = vbGreen
            bColoured = True
          End If
          rng.Cells(i).Characters(k, Len(itm)).Font.Color = RGB(244, 78, 189)
        End If
        k = k + Len(itm) + 1
      Next itm
    Next i
    Application.ScreenUpdating = True
  End Sub
  </code></pre>
  <p>Any help or advise is appreciated.</p>