+ Reply to Thread
Results 1 to 9 of 9

counting cells formatted with fill color

  1. #1
    Registered User
    Join Date
    05-31-2012
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    5

    counting cells formatted with fill color

    Is there any way to count cells in a single column that have a fill format? Like sum all yellow cells in column A...

  2. #2
    Forum Contributor
    Join Date
    02-15-2012
    Location
    Vancouver, BC
    MS-Off Ver
    Excel 2003
    Posts
    125

    Re: counting cells formatted with fill color

    Set C1 to the color you want to sum. Then use this: =ColorFunction($C$1,$A$1:$A$12,TRUE).

    Let me know if it works.

    Alternately, have a look at this web site: http://www.cpearson.com/excel/colors.aspx
    Last edited by roki4; 06-05-2012 at 02:07 PM.
    B.Econ, CFA

  3. #3
    Registered User
    Join Date
    05-31-2012
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: counting cells formatted with fill color

    doesn't work roki4, I'm getting #NAME? error

  4. #4
    Registered User
    Join Date
    05-12-2012
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: counting cells formatted with fill color

    Yes, I have also tried =SUMPRODUCT(--(ColorIndex(A1:A100)=3)), but the same result: #NAME? error...

  5. #5
    Valued Forum Contributor
    Join Date
    04-30-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    547

    Re: counting cells formatted with fill color

    Color is not data.

    Excel has no functionality to sum our count by color.

    It can filter by colour, though, but in general this is the backwards approach. Use a column to define a parameter. Then use conditional formatting based on the parameter. The color is for visual effect only. You can easily use Sumif() or Countif() to sum or count the parameters.

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: counting cells formatted with fill color

    ColorFunction is not a native excel function,it looks like a custom udf.
    what you can do is filter by colour then use the subtotal() function to count the filtered cells either the count or counta option within subtotal. if you are counting coloured cells that are blank tho' use a helper column just fill it to the end of your data with 1 then you can subtotal count that when you've filtered it.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  7. #7
    Registered User
    Join Date
    05-12-2012
    Location
    Germany
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: counting cells formatted with fill color

    Beauuutiful!

    Many thanks!

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: counting cells formatted with fill color

    oh here is a example
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    05-31-2012
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: counting cells formatted with fill color

    Thanks a million martindwilson, it works though I wish excel had that ability with a simple function, but for now this will do, 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