Calculating What Months a Date Range Covers

Tkennebrew

New Member
Joined
Oct 18, 2017
Messages
3
Good evening. I am developing a trend analysis of data that has a start and end date. I need to count the number of rotations that were active every month that falls within the start and end date range.

A rotation starts 1 Oct 16 and ends 4 Apr 17. When I go to count how many active rotations that I had in October, November, December, January March, and April, I need the dates of this record to tally across the months so I can add them up for a total count. I hope this makes sense. I've added a bit of the data that I am working with. I've been after this for some time now.

Thanks in advance!



10/1/201611/1/201612/1/20161/1/20172/1/20173/1/20174/1/20175/1/20176/1/2017
10/31/201611/30/201612/31/20161/31/20172/28/20173/31/20174/30/20175/31/20176/30/2017
Rotation StartRotation CompletedActive - InactiveOctNovDecJanFebMarAprMayJun
12/11/20164/7/2017Inactive0
11111000
1/16/20172/10/2017Inactive011111000
8/1/20156/3/2016Inactive000000000
2/5/20176/2/2017Inactive000011111
2/6/2017Active000011111
2/22/20166/21/2016Inactive000000000
1/1/20175/1/2017Inactive000111110

<tbody>
</tbody><colgroup><col><col><col><col><col span="3"><col span="6"></colgroup>
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
I'm in UK so need to change the date s
BUT
the first row has
start 12/11/16 - which is the 11th Dec 2016 to 7th April 2017
so why do you have a 1 Nov and a 0 in Apr
is this just the formatting here
or ????
 
Upvote 0
Excel Workbook
ABCDEFGHIJKLM
12Rotation StartRotation CompletedActive - Inactive01/10/201601/11/201601/12/201601/01/201701/02/201701/03/201701/04/201701/05/201701/06/2017
1311/12/201607/04/2017Inactive001111100
1416/01/201710/02/2017Inactive000110000
1501/08/201503/06/2016Inactive000000000
1605/02/201702/06/2017Inactive000011111
1706/02/2017Active000010000
1822/02/201621/06/2016Inactive000000000
1901/01/201701/05/2017Inactive000111110
Sheet1
 
Upvote 0
you can change the format of the header so it just shows the month

you also have a column showing active / inactive - is that also used at all ?

if the date completion is not filled in - do you just want to populate upto today() or for the entire sheet
 
Last edited:
Upvote 0
The current formula that I have in the cell trying to figure this out is incorrect. The data is just there to illustrate my problem.
 
Upvote 0
The active/inactive is a field used to filter the records. If the completion date is empty, that means that the current rotation is still active and should continue to count under the months that its activity covers. This data a part of a database that I built in Access that allows me to query based on the program coordinators requested requirements that vary. The latest request is to show a trend of the number of rotations monthly.
 
Upvote 0
ignore the active with a blank end date
does the solution work for you
if so then i can work on fixing the blank end date - but dont want to waste time if the inactive is incorrect
 
Upvote 0

Forum statistics

Threads
1,214,845
Messages
6,121,902
Members
449,053
Latest member
Guy Boot

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