I am trying to find a formula that will count the value in the rows that are greater than 0, that have consecutive values greater than or equal to 4.
This is what I've tried and have gotten an error:
=MAX(FREQUENCY(IF(B2:R2>=4,COLUMN(B2:R2)),IF(B2:R2<>1,COLUMN(B2:R2))))
[TABLE="class: grid, width: 10, align: left"]
<tbody>[TR]
[TD]Name[/TD]
[TD]2010[/TD]
[TD]2011[/TD]
[TD]2012[/TD]
[TD]2013[/TD]
[TD]2014[/TD]
[TD]2015[/TD]
[TD]2016[/TD]
[TD]2017[/TD]
[TD]consecutive yr[/TD]
[/TR]
[TR]
[TD]Sample 1[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Sample 2[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]5[/TD]
[/TR]
</tbody>[/TABLE]
This is what I've tried and have gotten an error:
=MAX(FREQUENCY(IF(B2:R2>=4,COLUMN(B2:R2)),IF(B2:R2<>1,COLUMN(B2:R2))))
[TABLE="class: grid, width: 10, align: left"]
<tbody>[TR]
[TD]Name[/TD]
[TD]2010[/TD]
[TD]2011[/TD]
[TD]2012[/TD]
[TD]2013[/TD]
[TD]2014[/TD]
[TD]2015[/TD]
[TD]2016[/TD]
[TD]2017[/TD]
[TD]consecutive yr[/TD]
[/TR]
[TR]
[TD]Sample 1[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]4[/TD]
[/TR]
[TR]
[TD]Sample 2[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]5[/TD]
[/TR]
</tbody>[/TABLE]