# Cumulative sum with dynamic array formula

1. ## Cumulative sum with dynamic array formula

Hi,

I have a list of numbers in A2:A8 and have a formula that produces a cumulative sum in B2:B9. The number 1 is written in B2 and the rest of the numbers are calculated with =B2+A2 in B3 copied down.

What I would like to see is a formula that produces the values in B2:B9 using a dynamic array formula that spills the results in the range starting at B2 and doesn't need to be copied down. Any ideas?

 # Cumulative 3 1 4 4 6 8 1 14 13 15 8 28 2 36 38

Best regards,
Marbleking  Register To Reply

2. ## Re: Cumulative sum with dynamic array formula

=MMULT(N(SEQUENCE(ROWS(A2:A9))>SEQUENCE(,ROWS(A2:A9))),N(+A2:A9))+1

or volatile OFFSET

=SUBTOTAL(9,OFFSET(A1,,,SEQUENCE(ROWS(A1:A8))))+1  Register To Reply

3. ## Re: Cumulative sum with dynamic array formula

Works like a charm! Thank you, Bo_Ry! :-)

Best regards,
Marbleking  Register To Reply

There are currently 1 users browsing this thread. (0 members and 1 guests) 