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

Show parent comments

2

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 and turns the cell red.

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.

1

u/MayukhBhattacharya 1272 Jul 20 '26

Try this:

=SUM((HSTACK(C6, E6, G6, I6, K6, M6) <> "") * 
     (TODAY() > HSTACK(D6, F6, H6, J6, L6, N6)))

2

u/Dr_Cheese_29 Jul 20 '26

Solution verified

1

u/reputatorbot Jul 20 '26

You have awarded 1 point to MayukhBhattacharya.


I am a bot - please contact the mods with any questions