I ve got this code.
Hey,![]()
Sub zad3() Dim iWarnColor As Integer Dim rng As Range Dim rngCell As Variant Set rng = Range("B5:E30") For Each rngCell In rng.Cells vVal = rngCell.Text If (WorksheetFunction.CountIf(rng, vVal) = 1) Then rngCell.Font.Color = RGB(255, 0, 0) Else rngCell.Font.Bold = True End If Next rngCell End Sub
I want to highlight the first unique values in red and the duplicates of it in bold. Currently I highlight all duplicates. What should I change? Thanks
Bookmarks