View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
RagDyeR RagDyeR is offline
external usenet poster
 
Posts: 3,572
Default 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