Formula required to reflect change of month in SUM calc

MarcB

New Member
Joined
Apr 28, 2011
Messages
30
I have a table with locations in rows and days (in date format) across columns, with daily data. I am trying to build another table below which uses the daily data above, but has cumulative month-to-date totals, using formulae I can copy across the new table, which recognises the change in the month in order to change the starting point of the SUM range. Any suggestions?
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Assuming your data look like this
Excel Workbook
ABCDEFGHIJKLMNOPQ
101-Jan04-Jan07-Jan10-Jan13-Jan16-Jan19-Jan22-Jan25-Jan28-Jan31-Jan03-Feb06-Feb09-Feb12-Feb15-Feb
2North96351973014535709782572333677
3East189766510952249412674438118510
4South12169169878642202865933254773
5West3111479455337739345953848375820
Sheet1
Excel 2003

If the order of locations, is same both tables then you this
Excel Workbook
ABC
7Jan-11Feb-11
8North562196
9East472188
10South385237
11West533270
Sheet1
Excel 2003
Cell Formulas
RangeFormula
B8=SUMIF($B$1:$Q$1,"<="&EOMONTH(B$7,0),$B2:$Q2)-SUMIF($B$1:$Q$1,"<"&A$7,$B2:$Q2)


if the Location order is different, then
Excel Workbook
FGH
7Jan-11Feb-11
8East562196
9West472188
10South385237
11North533270
Sheet1
Excel 2003
Cell Formulas
RangeFormula
G8=SUMPRODUCT((TEXT($B$1:$Q$1,"mmm-yy")+0=G$7)*($A$2:$A$5=$A8),$B$2:$Q$5)
 
Upvote 0
Thanks Sankar, but I need the corresponding month to date (MTD) figure for each of the days, so my table below would be the exact same layout as the table above with daily data, except the data would be the MTD at that particular day, if that makes sense.
 
Upvote 0
ok,try this
Excel Workbook
ABCDEFGHIJKLMNOPQ
1501-Jan04-Jan07-Jan10-Jan13-Jan16-Jan19-Jan22-Jan25-Jan28-Jan31-Jan03-Feb06-Feb09-Feb12-Feb15-Feb
16North961311322292592732783133834805625780113119196
17East18115121186196291313362403405472448293178188
18South122911071162032893313513793855992117164237
19West31428918323827134838742148053384167242250270
Sheet1
Excel 2003
Cell Formulas
RangeFormula
B16=SUMIF($B$1:$Q$1,"<="&B$15,$B2:$Q2)-SUMIF($B$1:$Q$1,"<="&EOMONTH(B$15,-1),$B2:$Q2)
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,808
Members
452,944
Latest member
2558216095

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