+ Reply to Thread
Results 1 to 2 of 2

Count Cells based on background color of conditional formats

  1. #1
    Forum Contributor
    Join Date
    07-27-2012
    Location
    Somerset, Kentucky
    MS-Off Ver
    Excel 2007
    Posts
    123

    Count Cells based on background color of conditional formats

    I have a range of cells say A1:A10. Depending on the condition, the conditional formatting either colors the background yellow, green or red.

    yellow (.ThemeColor = xlThemeColorAccent4 & .TintAndShade = 0.799981688894314)

    green (.ThemeColor = xlThemeColorAccent6 & .TintAndShade = 0.599963377788629)

    red = (.Color = 8420607 & .TintAndShade = 0.)



    I need either a VBA or a formula to count each color. The number of yellows in B1, the number greens in B2 and the number of reds in B3.

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Count Cells based on background color of conditional formats

    Chip Pearson has a nice article on what it takes to use colors created by conditional format.
    http://www.cpearson.com/Excel/CFColors.htm
    It would be better if you can define the condtions that create the colors.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

+ 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. Replies: 1
    Last Post: 11-11-2017, 09:52 AM
  2. Count / Sum based on Background Color with Manual and Conditional Format Color
    By sam99 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-20-2014, 08:00 PM
  3. Change cell background color based on another cells background color
    By Queo in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 4
    Last Post: 06-10-2014, 05:28 AM
  4. Set Background Color based on Conditional Format
    By Snoopy2003 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-11-2012, 06:30 PM
  5. Replies: 3
    Last Post: 05-02-2012, 09:08 AM
  6. Count Cells Based On A Background Color
    By NSTurk725 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-27-2010, 11:29 AM
  7. [SOLVED] How do you count cells with background color yellow?
    By Stephanie D in forum Excel General
    Replies: 6
    Last Post: 10-18-2005, 12:05 AM

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