+ Reply to Thread
Results 1 to 3 of 3

marking duplicates

Hybrid View

  1. #1
    Registered User
    Join Date
    07-05-2012
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    51

    marking duplicates

    i have lots of data in column a and i want to check for duplicates. what code would i need to use so that everytime a duplicate is found it turns the cell red

  2. #2
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: marking duplicates

    Will this work for you.
    Sub hsv()
    Dim cl As Range
     For Each cl In Columns(1).SpecialCells(2)
      If WorksheetFunction.CountIf(Columns(1), cl) > 1 Then cl.Interior.ColorIndex = 3
     Next cl
    End Sub
    Kind regards, Harry.

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,636

    Re: marking duplicates

    Use in Conditional formattin: =COUNTIF($A$1:$A$1000, $A1)>1

+ Reply to Thread

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