+ Reply to Thread
Results 1 to 3 of 3

Formula to count number of cells of particular colour

  1. #1
    Registered User
    Join Date
    12-10-2018
    Location
    Canada
    MS-Off Ver
    Microsoft 365
    Posts
    54

    Formula to count number of cells of particular colour

    Just wondering if there is a formula to count the times a particular colour occurs in a column. I know I could do a filter to count each time, but was wondering if there was a formula I could put at the end of the column/data column to count each occurrence of colour, to make it more permanent and not have to do the filter process each time for each region.

    Basically it would total the number of customers in a region, with black/red inactive customers who would not be counted in the list, disregarding the cell value.

    I've attached an example spreadsheet of what I'm hoping to accomplish.


    *edit changed row to column*
    Attached Files Attached Files
    Last edited by Cleetus09; 11-11-2019 at 05:37 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Formula to count number of cells of particular colour

    Short answer - no. color is formating (cosmetic), not data, and formulas work on data.

    However, if there is some logic to how the colors where applied, you may be able to use that same logic in a calc
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,811

    Re: Formula to count number of cells of particular colour

    Set up your worksheet as shown in the attached. Determine the color index for each color. Then, apply the following VBA code

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. [SOLVED] Formula to count number of 3's and 4's that appear in several different cells.
    By jman1115 in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 10-05-2016, 02:19 PM
  2. Replies: 2
    Last Post: 08-04-2016, 08:46 AM
  3. Replies: 18
    Last Post: 06-27-2016, 04:45 AM
  4. Replies: 3
    Last Post: 04-06-2014, 10:44 AM
  5. Formula to count the number of cells which contain a certain year
    By katieshields in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-19-2013, 11:22 AM
  6. Count the number of cells with a specific colour
    By Naja in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 03-12-2013, 11:06 AM
  7. count cells down with a number in formula
    By leighmills33 in forum Excel General
    Replies: 4
    Last Post: 04-30-2009, 08:11 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