Home > OS >  How to count consecutive highlighted cells per column?
How to count consecutive highlighted cells per column?

Time:10-07

I have an excel table looks like this:

enter image description here

The conditional formatting rule of this table is value>0 turns green and value<0 turns red.

How can I count the number of the consecutive green cells in each column? For example, 2 for Mon and 1 for Sat.

CodePudding user response:

Use COUNTIFS with offset ranges:

=COUNTIFS(B$3:B$25,"<0",B$4:B$26,">0") (B$3>0)

enter image description here

  • Related