I have a table which looks like this:
And formula in cell B3: =IF(A3>5, B2, B2+1)
and on every next row a corresponding variation of this formula.
I would like to know how to create ArrayFormula variant of this formula:
=IF(A3>5, B2, B2+1)
formulasgoogle sheetsgoogle-sheets-arrayformula
I have a table which looks like this:
And formula in cell B3: =IF(A3>5, B2, B2+1)
and on every next row a corresponding variation of this formula.
I would like to know how to create ArrayFormula variant of this formula:
=IF(A3>5, B2, B2+1)
Best Answer
=ArrayFormula({"Result";IF(A2:A="","",COUNTIFS(ROW(A2:A),"<="&ROW(A2:A),A2:A,"<=5"))})