Data Range Formula to Calculate Number of Months in Current Quarter

mcmuney

Board Regular
Joined
Sep 11, 2015
Messages
101
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.


[TABLE="width: 218"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Sched Date[/TD]
[TD]Termination[/TD]
[TD]Q2 Result[/TD]
[/TR]
[TR]
[TD="align: right"]1/1/2019[/TD]
[TD="align: right"]2/28/2019[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]1/1/2019[/TD]
[TD="align: right"]2/28/2021[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]2/1/2019[/TD]
[TD="align: right"]2/28/2021[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]3/1/2019[/TD]
[TD="align: right"]2/28/2021[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]4/1/2019[/TD]
[TD="align: right"]2/28/2021[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]5/1/2019[/TD]
[TD="align: right"]2/28/2021[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]6/1/2019[/TD]
[TD="align: right"]10/31/2019[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Month[/TD]
[TD="align: right"]6/30/2019[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Thanks.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
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,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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