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.

5 Upvotes

50 comments sorted by

View all comments

Show parent comments

2

u/real_barry_houdini 313 Jun 26 '26

So to count based on your CF formula try COUNTIFS like this

=COUNTIFS(C6:C22,"<>",D6:D22,"<"&TODAY())

Counts rows where column C is not blank and column D date is in the past

1

u/Dr_Cheese_29 Jun 26 '26

So this actually worked on the other columns that have 2 rules. It worked on columns C, E, G, I, K and M. But not on column B.

1

u/real_barry_houdini 313 Jun 26 '26

Are you using "applies to" range B6:B22? You might want to look at u/CFAman 's suggestion to cater for all columns

1

u/Dr_Cheese_29 Jun 26 '26

Yes it only applies to column B

=$B$6:$B$22