Summing weekly data for a specific month

Adar

New Member
Joined
Aug 8, 2011
Messages
4
Hi all,

I am receiving weekly data which I try to convert to a monthly one. My challenge is to identify cells related to, for example March and sum those in one cell related to March. I know the dates when data is reported ahead of time (e.g. every Friday).

Since dataset will expand in future, manually selecting related cells is cumbersome and can lead to errors.

Example of spreadsheet is attached below:

Thank you for help.

[TABLE="width: 500"]
<tbody>[TR]
[TD]week[/TD]
[TD]Income[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]300[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]6000[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]8[/TD]
[/TR]
</tbody>[/TABLE]

[TABLE="width: 500"]
<tbody>[TR]
[TD]Month[/TD]
[TD]Income[/TD]
[/TR]
[TR]
[TD]January[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]February[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]March[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Hi,

try this but be aware of weeks in which the month over takes place!


Book1
ABCDEF
1weekIncome2016
21300MonthIncome
3260001-1-20166320
4301-2-20166313
5451-3-20166320
6571-4-20166020
7681-5-20166320
873001-6-201615
9860001-7-20160
10901-8-20160
111051-9-20160
121171-10-20160
131281-11-20160
14133001-12-20160
15146000
16150
17165
Sheet3
Cell Formulas
RangeFormula
F3=SUMPRODUCT(--(A:A>=WEEKNUM(E3)),--(A:A<=WEEKNUM(EOMONTH(E3,0))),B:B)
F4=SUMPRODUCT(--(A:A>=WEEKNUM(E4)),--(A:A<=WEEKNUM(EOMONTH(E4,0))),B:B)
F5=SUMPRODUCT(--(A:A>=WEEKNUM(E5)),--(A:A<=WEEKNUM(EOMONTH(E5,0))),B:B)
F6=SUMPRODUCT(--(A:A>=WEEKNUM(E6)),--(A:A<=WEEKNUM(EOMONTH(E6,0))),B:B)
F7=SUMPRODUCT(--(A:A>=WEEKNUM(E7)),--(A:A<=WEEKNUM(EOMONTH(E7,0))),B:B)
F8=SUMPRODUCT(--(A:A>=WEEKNUM(E8)),--(A:A<=WEEKNUM(EOMONTH(E8,0))),B:B)
F9=SUMPRODUCT(--(A:A>=WEEKNUM(E9)),--(A:A<=WEEKNUM(EOMONTH(E9,0))),B:B)
F10=SUMPRODUCT(--(A:A>=WEEKNUM(E10)),--(A:A<=WEEKNUM(EOMONTH(E10,0))),B:B)
F11=SUMPRODUCT(--(A:A>=WEEKNUM(E11)),--(A:A<=WEEKNUM(EOMONTH(E11,0))),B:B)
F12=SUMPRODUCT(--(A:A>=WEEKNUM(E12)),--(A:A<=WEEKNUM(EOMONTH(E12,0))),B:B)
F13=SUMPRODUCT(--(A:A>=WEEKNUM(E13)),--(A:A<=WEEKNUM(EOMONTH(E13,0))),B:B)
F14=SUMPRODUCT(--(A:A>=WEEKNUM(E14)),--(A:A<=WEEKNUM(EOMONTH(E14,0))),B:B)
E4=EOMONTH(E3,0)+1
E5=EOMONTH(E4,0)+1
E6=EOMONTH(E5,0)+1
E7=EOMONTH(E6,0)+1
E8=EOMONTH(E7,0)+1
E9=EOMONTH(E8,0)+1
E10=EOMONTH(E9,0)+1
E11=EOMONTH(E10,0)+1
E12=EOMONTH(E11,0)+1
E13=EOMONTH(E12,0)+1
E14=EOMONTH(E13,0)+1
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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