View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
[email protected] krcowen@aol.com is offline
external usenet poster
 
Posts: 109
Default Array formula returning the cumulative sum

I think this should work for any number of rows, provided the top row
is in row 1. If the top row is not row 1, then the row() arugument
will need to be adjusted.

=SUM(OFFSET(A$1,0,0,ROW(),1))

entered as an array function of course.

Good luck.

Ken
Norfolk, Va



On Jun 14, 5:27 pm, JMB wrote:
I think the OP just wants to return the entire array, so I took the liberty
of removing the sum from your formula.
=SUBTOTAL(9,(OFFSET(A$1:A5,,,ROW(INDIRECT("1:5")), 1)))



"N Harkawat" wrote:
ASSUMING THE RANGE IS IN A1:A5 USE THIS FORMULA


=SUM(SUBTOTAL(9,(OFFSET(A$1:A5,,,ROW(INDIRECT("1:5 ")),1))))


"vsoler" wrote:


Because I am studying in depth the array formulas, I would like to
know if it is possible to build a formula such that, given a set of
numbers in a vertical range (1 column wide), it returns an array with
the cumulative sum.


For example, if A1:A5 contains:


3
8
5
1
6


Then, the formula should return


3
11
16
17
23


Of course, I know that the goal can be achieved by mean of a simple
formula:


=SUM($A$1:A1) copied down


However, I keep an interest (let's call it theoretical) in knowing if
the exercise is possible?


Can anybody help?- Hide quoted text -


- Show quoted text -