ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Running total array? (https://www.excelbanter.com/excel-worksheet-functions/93040-running-total-array.html)

uw805

Running total array?
 
Can anyone help me with a formula that can return an array with a "running
total" from a row of values? For example:

A B C D E F
Row 1: 1 0 2 3 0 5

I'm looking for a function/formula that would return an array that has the
total of all values as you move from A1 to F1: {1,1,3,6,6,11}

A long version of this formula would be something like:
={Sum(A1:A1),Sum(A1:B1),Sum(A1:C1),...,Sum(A1:F1)} but I will be working
with much longer strings of values. Perhaps something using MMULT or
SUMPRODUCT might work?

Any Ideas? Thanks.

Peo Sjoblom

Running total array?
 
One way



=SUM(MMULT(N(TRANSPOSE(COLUMN(A1:F1))=COLUMN(A1:F 1)),TRANSPOSE(A1:F1)))


entered with ctrl + shift & enter will return 28 which is the sum of
{1,1,3,6,6,11}


--

Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com
"It is a good thing to follow the first law of holes;
if you are in one stop digging." Lord Healey


"uw805" wrote in message
...
Can anyone help me with a formula that can return an array with a "running
total" from a row of values? For example:

A B C D E F
Row 1: 1 0 2 3 0 5

I'm looking for a function/formula that would return an array that has the
total of all values as you move from A1 to F1: {1,1,3,6,6,11}

A long version of this formula would be something like:
={Sum(A1:A1),Sum(A1:B1),Sum(A1:C1),...,Sum(A1:F1)} but I will be working
with much longer strings of values. Perhaps something using MMULT or
SUMPRODUCT might work?

Any Ideas? Thanks.





All times are GMT +1. The time now is 01:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com