Home > database >  Convert =SUM(A1:A) to arrayformula
Convert =SUM(A1:A) to arrayformula

Time:03-31

How this formula can be converted in to array =SUM(A1:A) so that I won't drag the formula to the last cell.

I tried =Arrayformula(sum(A1:A)) but it only works on the cell where the formula is.

CodePudding user response:

if you attempt for cumulative sum try:

=ARRAYFORMULA(SUMIF(ROW(A1:A10), "<="&ROW(A1:A10), A1:A10))

enter image description here

CodePudding user response:

Try below formula-

=ArrayFormula(IF(A2:A,MMULT(TRANSPOSE((ROW(A2:A)<=TRANSPOSE(ROW(A2:A)))*A2:A),SIGN(A2:A)), IFERROR(1/0)))

Another easier formula-

=ArrayFormula(IF(LEN(B2:B),(SUMIF(ROW(B2:B),"<="&ROW(B2:B),B2:B)),))

Read this enter image description here

  • Related