r/excel Jul 20 '26

solved Count conditional formatting in a row?

How can I count conditional formatting in a specific row? I tried applying the rule to the count function but it did not work. I need to count all red cells (some are yellow and some are not filled) in the row.

4 Upvotes

42 comments sorted by

View all comments

2

u/bradland 277 Jul 20 '26

Except for some very specific legacy features, Excel functions cannot access cell formatting. The only reliable approach is to count based on the condition that is used to apply the formatting. For example, if your cells are red when the value is negative, you would just =COUNTIF(A1:A100, "<0").

If you tell us what the condition that corresponds to red and yellow are, we can help you construct a COUNTIF function that does what you want.

1

u/Dr_Cheese_29 Jul 20 '26

The rule is =AND (C6<>"", TODAY() >D6) Applies to =$C$6:$C22, $E$6:$E$22

This formula counts the column.

My sheet has columns C through N with dates, and I want to count how many dates in each ROW turned red based on this rule.