Data Range Formula to Calculate Number of Months in Current Quarter

mcmuney

Board Regular
Joined
Sep 11, 2015
Messages
97
Office Version
  1. 365
Hi Everyone, I'm having a brain fart. Can anyone help me with this? It will be greatly appreciated.

My data has these two date columns and I need to figure out how many months fall in Q2 of 2019. The 3rd column shows the desired results it should give me using the 6/30/2019 date (For Q1, I'd use 3/31/19, Q3 9/30/19, etc.


Sched DateTerminationQ2 Result
1/1/20192/28/20190
1/1/20192/28/20213
2/1/20192/28/20213
3/1/20192/28/20213
4/1/20192/28/20213
5/1/20192/28/20212
6/1/201910/31/20191
Month6/30/2019

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


Thanks.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
The formula in G2 is the classic formula to find out how many overlapping days there are in 2 ranges. Then you can add the formula in H2 to get it to months.


Book1
ABCDEFGH
1Sched DateTerminationQ2 ResultDate 1Date 2DaysMonths
21/1/20192/28/201904/1/20196/30/201900
31/1/20192/28/20213903
42/1/20192/28/20213903
53/1/20192/28/20213903
64/1/20192/28/20213903
75/1/20192/28/20212602
86/1/201910/31/20191291
9Month6/30/2019
Sheet8
Cell Formulas
RangeFormula
G2=MAX(0,MIN($F$2,B2)-MAX($E$2,A2))
H2=ROUND(G2/30,1)
 
Upvote 0

Forum statistics

Threads
1,214,819
Messages
6,121,729
Members
449,049
Latest member
MiguekHeka

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