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"))?



I want to count the number of cells in a range that have a particular interior color. The countif fu..

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

Post New Answer

More MS Excel Microsoft Interview Questions

Why is my excel spreadsheet greyed out?

1 Answers  


What is difference between ms word and ms excel?

1 Answers  


What is the formula for calculating in excel?

1 Answers  


How can I be good in excel?

1 Answers  


Who built microsoft excel?

1 Answers  


How many rows can excel have?

1 Answers  


How do you add multiple rows?

1 Answers  


How to add multiple formulas in one cell in excel?

1 Answers  


What is excel criteria?

1 Answers  


How do you view a pivot table in excel?

1 Answers  


What are the disadvantages of ms excel?

1 Answers  


How do you concatenate text in excel?

1 Answers  


Categories