I want to count the number of cells in a range that have a particular interior color. The countif function seems like the right kind of answer but how to I return thecolor of the interior for each cell in a range? I would like to do something like: =countif(b1:b10, cell("interior","red"))?
Answer / Dhiraj Parath
Unfortunately, Excel's COUNTIF function doesn't support checking the interior color of cells. However, you can use a combination of COUNTIFS and conditional formatting to achieve this. Here is an example:
1. Select the range where you want the result to be displayed (let's say D1).
2. Enter the following formula in D1: `=SUM(IF(COUNTIFS(B1:B10, B1, INDEX((ISNUMBER(SEARCH("red", CELL(CELL,"Interior.Color", row(","), 3))), ROW(")), "",""), 1) > 0, 1, 0))`
3. Press Enter and drag the fill handle (the small square at the bottom-right corner of the cell) down to copy the formula for all the rows you need.
4. This will count the number of cells in the specified range (B1:B10) that have a red interior color.
| Is This Answer Correct ? | 0 Yes | 0 No |
Why is my excel spreadsheet greyed out?
What is difference between ms word and ms excel?
What is the formula for calculating in excel?
How can I be good in excel?
Who built microsoft excel?
How many rows can excel have?
How do you add multiple rows?
How to add multiple formulas in one cell in excel?
What is excel criteria?
How do you view a pivot table in excel?
What are the disadvantages of ms excel?
How do you concatenate text in excel?