+ Reply to Thread
Results 1 to 3 of 3

Macro to Count Duplicate Values

  1. #1
    Forum Contributor
    Join Date
    09-25-2012
    Location
    Ventura, united States
    MS-Off Ver
    Excel 2010
    Posts
    346

    Macro to Count Duplicate Values

    I am using the conditional formatting to highlight duplicate values. Then I want to check for all the highlighted cells and count the duplicates (dividing by 2). The conditional formatting records the interior color used to highlight is 13551615, but it doesn't recognize that the highlighted cells are this color later.

    To highlight duplicates

    Please Login or Register  to view this content.
    To count highlighted cells

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Macro to Count Duplicate Values

    I have checked with a bit of code and:

    It looks like Excel doesn't recognise the fact that the color is changed by a conditional format.

    You may have to check for duplicates in Visual Basic

    .Interior.Color returns the "real" color, not the conditionally-formatted color result..
    Last edited by mehmetcik; 04-13-2013 at 05:52 PM.

  3. #3
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Macro to Count Duplicate Values

    Pearson spells it out really nicely here: http://www.cpearson.com/excel/CFColors.htm

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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