Results 1 to 13 of 13

highlight duplicates

Threaded View

  1. #1
    Registered User
    Join Date
    01-26-2013
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    29

    highlight duplicates

    I ve got this code.


    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
    Hey,


    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
    Last edited by arlu1201; 03-05-2013 at 05:25 AM. Reason: Code tags not php tags.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1