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.
Count different coloured cells in excel
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
2 answers
Sort by: Most helpful
-
-
Jiajing Hua-MFST 10,645 Reputation points Microsoft Vendor
2024-08-09T05:46:21.1533333+00:00 Here is a similar thread: EXCEL: COUNTIF FUNCTION DEPENDING ON THE COLOUR OF THE CELL.
GET.CELL
andCountif
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.