ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   sum an array that changes (https://www.excelbanter.com/excel-discussion-misc-queries/113861-sum-array-changes.html)

Michael

sum an array that changes
 
Hi,
I can't find out how to do this despite searching many posts and I think it
should be easy
I have a range of numbers forecast for each month
eg
jan feb march etc
pay 5 10 6
NI 2 4 3
Pen 3 3 3

Each month I would like to show the cumulative forecast figure for each line
which means the formula changes
eg (using the simple table above)
in february the formula for pay should be =sum(a2:a3)
in March it would be =sum(a2:a4) etc
Howe can I do this automatically so that if I had a cell that shows the
month I could change the month and that would change the formula so that it
picks up the new months data

I hope I have explained this well.

Thanks in anticipation


sum a range of cells

RagDyeR

sum an array that changes
 
Your display shows values going along a row, across columns, BUT ... your
explanation mentions totaling "Pay" down Column A.

Following your display example, with headers in both Column A and Row1,
Months from B1 to O1 (text entries),
Items from A2 to A(n),

Enter the ending month to total in P1,
And enter this formula in P2:

=SUM(B2:INDEX(B2:O2,MATCH($P$1,B$1:O$1,0)))

And copy down as needed.

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------


"Michael" wrote in message
...
Hi,
I can't find out how to do this despite searching many posts and I think
it
should be easy
I have a range of numbers forecast for each month
eg
jan feb march etc
pay 5 10 6
NI 2 4 3
Pen 3 3 3

Each month I would like to show the cumulative forecast figure for each
line
which means the formula changes
eg (using the simple table above)
in february the formula for pay should be =sum(a2:a3)
in March it would be =sum(a2:a4) etc
Howe can I do this automatically so that if I had a cell that shows the
month I could change the month and that would change the formula so that
it
picks up the new months data

I hope I have explained this well.

Thanks in anticipation


sum a range of cells




All times are GMT +1. The time now is 09:25 PM.

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