+ Reply to Thread
Results 1 to 7 of 7

Bar chart which counts how many cells are formatted as a colour

  1. #1
    Forum Contributor
    Join Date
    12-11-2013
    Location
    St Moritz, GR, Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    187

    Bar chart which counts how many cells are formatted as a colour

    How do I write a bar chart which reads the format of a cell instead of the content? ie I want to count how many cells in each column are amber. Amber cells have already been decided by conditional formatting.

    See demo attached.
    Attached Files Attached Files

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,441

    Re: Bar chart which counts how many cells are formatted as a colour

    use the same CF rules to count number of cells.

    Your example does not include the CF you mention
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    12-11-2013
    Location
    St Moritz, GR, Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    187

    Re: Bar chart which counts how many cells are formatted as a colour

    That's only representative of what I have filled in. Here's it organised conditionally if it helps.

    use the same CF rules to count number of cells.
    I don't know how to do that; hence I request some assistance.
    Attached Files Attached Files

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,441

    Re: Bar chart which counts how many cells are formatted as a colour

    use the following formula to calculate values in row 22.

    =COUNTBLANK(B2:B19)

    It's not clear from your example whether row 1 should be include or excluded from the count.

  5. #5
    Forum Contributor
    Join Date
    12-11-2013
    Location
    St Moritz, GR, Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    187

    Re: Bar chart which counts how many cells are formatted as a colour

    That works for blanks but there's a lot of different reasons the cell could be orange. Is it possible for a formula to read the colour of another cell this way?

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,441

    Re: Bar chart which counts how many cells are formatted as a colour

    You need to apply exactly the same tests to the cells that you use for CF, as I said previously. You can then deduct that value from total number of cells to get bar value.

    If you don't know the CF that was applied they you can, in newer excel versions, use the DisplayFormat to determine cells fill colour as result of CF. To do this you would need to use VBA

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    12-11-2013
    Location
    St Moritz, GR, Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    187

    Re: Bar chart which counts how many cells are formatted as a colour

    Thanks. I've adapted it to the real life document.

+ 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. UDF to Count Conditionally formatted cells by colour
    By ozzy_q in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 10-06-2013, 09:00 AM
  2. calculating a row of cells with are formatted with a colour
    By jparham in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-22-2012, 08:06 AM
  3. [SOLVED] Sum of conditionally formatted cells by colour
    By codeyl5 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2012, 09:42 AM
  4. Counting CF colour formatted cells in a row.
    By Svein in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-27-2008, 03:06 PM
  5. [SOLVED] Counting colour formatted cells
    By Hood in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-23-2006, 10:15 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