+ Reply to Thread
Results 1 to 8 of 8

Counting Conditional Formats

  1. #1
    Registered User
    Join Date
    06-09-2008
    Posts
    10

    Counting Conditional Formats

    I read this thread but it seems to refer to counting only one type of format. I have multiple columns in my sheet, with multiple formats (The variables change for each column though still only return 1 of 2 colours.) but want to count how many of each resulting colour there are across the whole range.

    The sheet is an overview of sales accounts we "own" for various brands in various verticals. So Grey= our account and Green= Competitor or unknown. Is there a way to count all the Grey and Green accounts?

    that way I can make a % of what penetration we have by territory, brand, and market segment.

    All help appreciated.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    You probably just need a Countif() formula

    e.g. =Countif(A1:A100,"our_account") for Grey

    and =Countif(A1:A100,<>"our_account") for Green

    adjust ranges to suit and and change "our_account" to your actual account name (leave the double quotes in tact).
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    06-09-2008
    Posts
    10
    I was hoping there was a way I could just count the green vs grey as opposed to having to write a new formula based on the variables that turned the cell green or grey. I have a number of columns with multiple variables.

    Do you know if it's posisble to count solely on the colour of the cell derived from a conditional format?

    Thanks

    David

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    You could combine the formulas

    e.g. =Countif(A1:A100,"our_account")/(A1:A100,<>"our_account") or other ways...

    If you can say exactly what you want the formula to do, then we can help further.

  5. #5
    Registered User
    Join Date
    06-09-2008
    Posts
    10
    I'm struggling with nomenclature!

    The easiest way to say it is that the only thing in common that the green cells or the grey cells will have is that they are green or grey. The conditional format that made them that colour will vary by each column, virtually no column has the same variables that would return a positive (grey) or a negative (Green). As a result I was hoping to count only based on the colour of the cell as opposed to the content.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Counting the results of conditional formatting requires VBA, and is complicated well beyond its value. If you want to do it anyway, Chip Pearson has code on his site.

    It's much simpler to use a separate column to compute conditional formatting formulas, and then use that for both conditional formatting and anything you want to measure.

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    I ditto shg's response....

    Here's the website from Chip Pearson.

    http://www.cpearson.com/Excel/CFColors.htm

  8. #8
    Registered User
    Join Date
    06-09-2008
    Posts
    10
    Thanks very much to you both. I'm getting greedy after the great help with the conditional formatting help I got yesterday

    Thanks again!

+ 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