sum an array that changes

G

Guest

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
 
R

RagDyer

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top