Count different coloured cells in excel

Suzanne McCulloch 0 Reputation points
2024-08-08T09:36:26.97+00:00

I have a RAG rating spreadsheet containing white (no fill), grey, green, amber and red cells. I am trying to find a formula to count the Red cells in a row.

Thanks,

Suzanne

Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,959 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Barry Schwarz 3,071 Reputation points
    2024-08-09T01:28:08.6366667+00:00

    If you are willing to use a macro, you can create a user defined function that will do the counting. The basic approach is to define a function that takes two arguments: a range and the number of a color. The function loops through each cell in the range. If the cell.Interior.Color property matches the color argument, it increments the count. When the loop ends, the function returns the count.

    0 comments No comments

  2. Jiajing Hua-MFST 10,645 Reputation points Microsoft Vendor
    2024-08-09T05:46:21.1533333+00:00

    Hi @Suzanne McCulloch

    Here is a similar thread: EXCEL: COUNTIF FUNCTION DEPENDING ON THE COLOUR OF THE CELL.

    GET.CELL and Countif functions can help you count the number of cells of different colors.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.