How To Construct a SUM formula

simonj64

Board Regular
Joined
Apr 1, 2006
Messages
86
Hi,

I am looking at writing a formula to sum values of a calendar (columns in months) up to a certain period in that calendar - and would like for it to generically work without having to update the ranges in a formula each month etc.

Below is a pict of the data - for ID = A, the formula sits on the first row and needs to sum the data from the second row upto a certain point. I need to be able to copy this to multiple ID rows etc. I have been getting use to using the INDEX MATCH functions and wondered if this was a route to go. Additionally this information may be setup as a table.

Hopefully the table is readable


Current Period Mar

ID DataType Jan Feb Mar Apr May Jun Jul Sum Period
A Summary 60
A Phased 10 20 30 40 50
B Summary 6
B Phased 1 2 3 4 5 0
0

Any thoughts on how I can parametise the summation of the Phased row for an ID upto a date based on a user entry ?

Thanks in advance

Simon
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Is this what you want?


Excel 2010
ABCDEFGHIJ
1IDDataTypeJanFebMarAprMayJunJulSum Period
2ASummary60Mar
3APhased1020304050
Sheet1
Cell Formulas
RangeFormula
C2=SUM(C3:INDEX(C3:I3,MATCH(J2,C1:I1,FALSE)))
 
Upvote 0
Great Thanks - Just what I needed. One slight difficulty I do have is that I have to perform another similar calc but up to the end of the previous month - if as in the example above the Period is Mar (and I have this value set as a named range e.g. dReportMonth, how can I do the sum up to the end of the previous month e.g. Feb ?

Thanks once again

SJ
 
Upvote 0

Forum statistics

Threads
1,215,947
Messages
6,127,867
Members
449,410
Latest member
adunn_23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top