+ Reply to Thread
Results 1 to 4 of 4

How do I Count Cells Colored with Conditional Formatting?

  1. #1
    Registered User
    Join Date
    10-11-2015
    Location
    Omaha, NE
    MS-Off Ver
    Microsoft Starter 2010
    Posts
    35

    Question How do I Count Cells Colored with Conditional Formatting?

    I am using the following code:

    Please Login or Register  to view this content.
    This creates the following formula in excel:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In the formula the range_data is the cells you want to search while the criteria points to the color you want to search for.

    Unfortunately this only works if the cell is formated to be that color. Apparently Conditional Formatting doesn't actually change the fill color, just makes it appear to be changed. Is there anyway to make VBA see the conditional formatted color instead of a cell with no color?

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: How do I Count Cells Colored with Conditional Formatting?

    Or... can you count the coloured cells, filled using CF, using the same formula as used for the CF???
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    10-11-2015
    Location
    Omaha, NE
    MS-Off Ver
    Microsoft Starter 2010
    Posts
    35

    Re: How do I Count Cells Colored with Conditional Formatting?

    Quote Originally Posted by Glenn Kennedy View Post
    Or... can you count the coloured cells, filled using CF, using the same formula as used for the CF???
    How would I do that? Also I should have mentioned that I am using two different CFs so there will be two different colors to search for instead of just one.

    The formula for CF I used is as follows:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If this is true, the cell is changed to that color. Not sure how I would make a CF use this to count how many cells use that particular color.

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: How do I Count Cells Colored with Conditional Formatting?

    Try this UDF
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to count colored cells with conditional formatting
    By DJFISH614 in forum Excel General
    Replies: 8
    Last Post: 08-09-2016, 06:06 PM
  2. Replies: 6
    Last Post: 06-07-2016, 01:50 AM
  3. [SOLVED] Count colored cells for conditional formatting
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-08-2015, 05:52 AM
  4. Replies: 1
    Last Post: 11-09-2013, 02:43 AM
  5. Count Cells colored by conditional formatting
    By sam99 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-19-2013, 02:58 PM
  6. How to count colored cells with conditional formats
    By lowrey72 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-20-2009, 02:51 AM
  7. conditional formatting and colored cells
    By henro8 in forum Excel General
    Replies: 9
    Last Post: 07-10-2008, 03:12 PM

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