title: excel macro to highlight first instance of a value in a column
body: <p>I have found a macro that highlights duplicates</p>
  
  <pre><code>Public Sub MarkDuplicates()
      Dim iWarnColor As Integer
      Dim rng As Range
      Dim rngCell As Variant
  
  
      Set rng = Range("A1:A65000")
      iWarnColor = xlThemeColorAccent2
  
      For Each rngCell In rng.Cells
          vVal = rngCell.Text
          If (WorksheetFunction.CountIf(rng, vVal) = 1) Then
              rngCell.Interior.Pattern = xlNone
          Else
              rngCell.Interior.ColorIndex = iWarnColor
          End If
      Next
  End Sub
  </code></pre>
  
  <p>But I need it to highlight all the duplicates except for the first instance. Perhaps a better way is to highlight the first instance of a unique value instead? </p>