+ Reply to Thread
Results 1 to 6 of 6

Is there a formular in Excel that can count the colours of a cell?

  1. #1
    Registered User
    Join Date
    11-01-2012
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Is there a formular in Excel that can count the colours of a cell?

    Hi Everyone,

    I was wondering can excel count the number of cells have a particular fill colour?

    Its mainly to have a summary of urgent, medium and low priorities, which are highlighted by colour- so the text within each box will vary.

    Thanks for your help with this.

    PS. I'm using Excel 2007.
    Attached Files Attached Files

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,604

    Re: Is there a formular in Excel that can count the colours of a cell?

    use this UDF:

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


    I put your data vertically so you can easily drag formula down.

    I've also added SumByColor in same workbook, just in case you need it
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    02-02-2008
    Location
    EU
    MS-Off Ver
    MS Excel 2007 Professional version
    Posts
    214

    Re: Is there a formular in Excel that can count the colours of a cell?

    Your excel has Macro based file. Is this needed for this function?

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,604

    Re: Is there a formular in Excel that can count the colours of a cell?

    You could use filter and filter out colored cells (Excel 2007+) and then use SUBTOTAL function to count remaining rows...
    But other than that you need a macro (can't be done with regular formula).
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    02-02-2008
    Location
    EU
    MS-Off Ver
    MS Excel 2007 Professional version
    Posts
    214

    Re: Is there a formular in Excel that can count the colours of a cell?

    1. Do you have some sample for filter and filter out colored cells (Excel 2007+) and then use SUBTOTAL function to count remaining rows...

    2. Where I see your settings for Macro? I see only function or I have to store into your format extension?

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,604

    Re: Is there a formular in Excel that can count the colours of a cell?

    1. Check example above
    2. in macro module: click Alt+F11 to open VB editor
    3. if you have some further questions, acoording to Rule 2 of our Forum [/I]RULES -- start your own thread. If you feel it's particularly relevant, provide a link to this (or other) thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.

+ 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