Counting Days in Specific Month between Two Dates

acwhelan

New Member
Joined
Nov 1, 2011
Messages
24
Hello,

I am trying to determine a formula that will calculate the the number of days that fall within a certain month.

Example: April
04/24/201004/02/20112
03/02/201104/03/20113

<tbody>
</tbody><colgroup><col><col><col></colgroup>


I need to do this for the months of April to July so I can calculate a proration based on the days falling in a specific month.

Please assist :)
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
this will calculate the number of days in a month. Where A1= your date
=DAY(EOMONTH(A1,0))
 
Upvote 0
Start
End
Jan
Feb
Mar
1/2/2009
1/2/2009
1
1/16/2009
3/27/2009
16
28
27
2/3/2009
3/11/2009
26
11

<tbody>
</tbody>
 
Last edited:
Upvote 0
So I am trying to find the number of days that fall in each particular month between two dates
 
Upvote 0
I found this formula: =MAX(0,MIN($E2,F$1+31-DAY(F$1+31))-MAX($D2,F$1)+1)

TO someone with a similar question where
E2: End date (April 1)
D2: Start Date (April 2)
F1: Name of Month : APR

However, this formula just return the total number of days in April; hence, 30. When in fact it shoudl return 2.
 
Upvote 0
Hello,

I was wondering if you found a formula that would caluculate this? Please let me know if I need to clarify. I realize at first the dates I provided were confusing as it should have said April 2011.

I believe the second chart shows the numbers I am looking to received.

Please help!

Thanks!
 
Upvote 0
Hello,

I was wondering if you found a formula that would caluculate this? Please let me know if I need to clarify. I realize at first the dates I provided were confusing as it should have said April 2011.

I believe the second chart shows the numbers I am looking to received.

Please help!

Thanks!
Try this...

Book1
ABCDE
1StartEnd1/1/20092/1/20093/1/2009
21/2/20091/2/2009100
31/16/20093/27/2009162827
42/3/20093/11/200902611
Sheet1

This formula entered in C2:

=MAX(0,MIN(EOMONTH(C$1,0),$B2)-MAX(C$1,$A2)+1)

Copy across as needed then down as needed.

Note that the EOMONTH function requires the Analysis ToolPak
add-in be installed if you're using a version of Excel prior to
Excel 2007. If you enter the formula and get a #NAME?
error look in Excel help for the EOMONTH function. It'll tell you
how to fix the problem.
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,918
Members
449,094
Latest member
teemeren

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