Search code examples
if-statementgoogle-sheetssumgoogle-sheets-formulacumulative-sum

google sheets - Sum all above rows with ARRAYFORMULA


I want to do Pareto analysis, So I have column A which is ordered Z->A. I want to fill the column B as it is the sum of previous records in A. just like the example:

enter image description here

How Can I rewrite the B formula using ARRAYFORMULA function?


Solution

  • try in B2:

    =ARRAYFORMULA(IF(A2:A="";;SUMIF(ROW(A2:A); "<="&ROW(A2:A); A2:A)))