Calculate values by Calendar month

Thorin

Board Regular
Joined
Feb 8, 2007
Messages
243
I have weekly figures, but need to calculate them by calendar month.

Example :-

Week 1 = Week ending 3rd Nov 2007 Value 1940
Week 2 = Week ending 10th Nov 2007 Value 2221
Week 3 = Week ending 17th Nov 2007 Value 2123
Week 4 = Week ending 24th Nov 2007 Value 1905
Week 5 = Week ending 1st Dec 2007 Value 2134

I am trying to establish a formula which will calulate Novembers value (or indeed any month), this will take the weeks that span the month ends and calculate a day value.

My hope is that I type in the month in one cell and the formula to calculate the value will give me the months value only.

What would be the best formula to achive this ?

Many thanks
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
How exactly is the data laid out? I.e., is 3rd November 2007 housed in it's own cell? Lets say for purpose of this example that week ending date is housed in column B and amount is housed in column D.
Code:
=SUMPRODUCT(--(TEXT($B$2:$B$100,"mmm yy")="Nov 07"),$D$2:$D$100)
This will return the value associated with November.

Regards
Jon
 
Upvote 0
Jon,

Yes the dates are in their own cells, by 3rd Nov is a week ending date, and only 3 days for that week belong to November.
 
Upvote 0
I don't know what the nature of the values are. How do you mean to apportion these values? Is calculating the number of days between weekending dates and using this as a means of apportionment appropriate?
 
Upvote 0
As an example of what I mean by my previous post:
Book1
ABCDEF
1w/e datevalueDaily proportionDays DiffNew PeriodNew Balance
215/06/2007138.0019.71-Jun 07138.00
322/06/2007110.0015.71- 8.00Jun 07110.00
429/06/2007131.0018.71- 1.00Jun 07145.86
506/07/2007104.0014.866.00Jul 0789.14
613/07/2007120.0017.14- 18.00Jul 07120.00
720/07/2007147.0021.00- 11.00Jul 07147.00
827/07/2007117.0016.71- 4.00Jul 07174.14
903/08/2007100.0014.293.00Aug 0742.86
1010/08/2007141.0020.14- 21.00Aug 07141.00
1117/08/2007131.0018.71- 14.00Aug 07131.00
1224/08/2007113.0016.14- 7.00Aug 07113.00
1331/08/2007140.0020.00-Aug 07140.00
14
15Jun 07393.86
16Jul 07530.29
17Aug 07567.86
Sheet1


But again I'm unsure if this is an appropriate means to apportion the values since I do not know what these values represent.

Regards
Jon
 
Upvote 0
Strickly apportioned by the number of actual days in the week, always a week of seven days.
 
Upvote 0
In which case the method I've demonstrated should do the trick. Can you make sense of it or do you want me to explain step by step what I have done?

Regards
Jon :)
 
Upvote 0
Jon,

Many thanks for this, it make perfect sense to me.

You asked what the values represent, they are tonnes of animal feed supplied to farm an a weekly basis, I was trying to work out how much tonnage is consumed by the chicken crop on farm.
 
Upvote 0
If you have week ending dates in A2:A11 and corresponding tonnage figures in B2:B11 then if you put the first date of the month of interest, e.g. 1/11/2007 in D2 this formula will give the total for the month

=SUM(IF(A2:A11>=D2,IF(A2:A11< D2+38-DAY(D2+31),IF(DAY(A2:A11) >6,7,IF(A2:A11-D2>9,7-DAY(A2:A11),DAY(A2:A11)))))*B2:B11)/7

confirmed with CTRL+SHIFT+ENTER
 
Upvote 0

Forum statistics

Threads
1,215,326
Messages
6,124,270
Members
449,149
Latest member
mwdbActuary

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