Search code examples
google-sheetsarray-formulas

array formula to auto increment if conditions


Need array formula to auto increment column A when date is set and amount is not equal to 0

sheet link

enter image description here


Solution

  • Here's one way you could do that:

    =ArrayFormula(IF(B2:B*(C2:C&""<>"0");SCAN(;ROW(B2:C)-1;LAMBDA(a;c;a+IF(INDEX(B2:B;c)*INDEX(C2:C&""<>"0";c);1)));))