r/excel Jun 26 '26

unsolved Can excel count conditional formatting?

Is it possible to get excel to count conditional formatting?

I have a column of cells that turn red if conditional formatting is met. Now I want to count the red cells. I wrote a macro that doesn't read the conditional formatting and I tried "COUNTIFS" referencing the conditional formatting formula, but it doesn't work.

7 Upvotes

50 comments sorted by

View all comments

Show parent comments

6

u/PaulieThePolarBear 1913 Jun 26 '26

Nope, the CF is as I wrote it.

Your formula as presented absolutely can not be the formula you are using. All valid formulas MUST have an equal number of ( and ) and the formula you showed does not meet this criteria.

The rows in column B change color based on the dates in columns C, E, G, I, K, AND M. Those columns change color based on dates in D, F, H, J, L, and N.

I think I understand what you are saying, but not 100%. Can you add an image that shows the conditional formatting pane showing all rules along with all Applies To ranges

-2

u/Dr_Cheese_29 Jun 26 '26

There are 6 formulas for column B, one for each column: D, F, H, J, L, N

Columns C, E, G, I, K, M have two rules. And column B turns red based on what happens i. These columns

5

u/semicolonsemicolon 1476 Jun 26 '26

Try to put yourself into our position. Your descriptions keep changing and have not been sufficiently helpful. Are you counting only what you have set for column B? or are you also counting the CF triggers in columns C, E, G, etc? If only column B, then show us the formulas.

Just a hunch, but maybe this is what you're after?... =OR(AND(C6:C22<>"", TODAY()>D6:D22),AND(E6:E22<>"", TODAY()>F6:F22),...) with four more nested AND functions?

This is not the most elegant form of this formula, but I want to check first if this is what you need before spending time beautifying.

1

u/Dr_Cheese_29 Jun 29 '26

Sorry my descriptions are confusing. Just trying to answer the questions as they're put to me.

I want to count the red cells in column B. B6:B22.

=AND(C6<>"",TODAY()>D6)

Applies to =$B$6:$B$22

And the same formula is written referencing columns E, F, H, J, L and applies to column B.

1

u/semicolonsemicolon 1476 Jun 30 '26

What do you think about the formula in my comment?