Forum Discussion
durendal
Nov 16, 2022Brass Contributor
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 ...
- Nov 16, 2022
=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.
OliverScheurich
Nov 16, 2022Gold Contributor
=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.
- durendalNov 16, 2022Brass ContributorThank you very much OliverScheurich that's perfect!