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)
Web Applications Stack Exchange is a question and answer site for power users of web applications. It only takes a minute to sign up.
Sign up to join this communityI 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)
=ArrayFormula({"Result";IF(A2:A="","",COUNTIFS(ROW(A2:A),"<="&ROW(A2:A),A2:A,"<=5"))})
probably not the answer OP is looking for, but here are some examples how to construct ARRAYFORMULA
from =IF(A3>5, B2, B2+1)
LEN
counts how many characters are in cell.=ARRAYFORMULA(IF(LEN(A1:A), true, false))
checks every row in given range if its empty/not-empty. in other words this works like some check-in restriction. kinda same as=ARRAYFORMULA(IF(A1:A<>"", true, false))
– user0 Jan 24 '19 at 21:01