Forum Discussion

durendal's avatar
durendal
Brass Contributor
Nov 16, 2022
Solved

Counting consecutive cells equal to 0 at the end of the range

Hell everybody,   I am looking for a formula to count the consecutives values of 0 at the end of a line. Let me show you an example with the expected result. Let's say the only two values in this ...
  • OliverScheurich's avatar
    Nov 16, 2022

    durendal 

    =BYROW(C3:N5,LAMBDA(row,12-LARGE(IF(row>0,COLUMN(C3:N3)-2),1)))

    With Office365 or Excel 2021 or Excel online you can try this formula.

    =12-LARGE(IF(C5:N5>0,COLUMN(C3:N3)-2),1)

    With older versions you Excel you can try this formula. Enter the formula with ctrl+shift+enter if you don't work with Office365 or 2021.

     

Resources