Calculate number of quarters between two dates that cross over years

vmoore845

New Member
Joined
Oct 5, 2020
Messages
14
Office Version
  1. 2010
Platform
  1. Windows
I have used the following formula:

=Floor(((Year(End date)*12+Month(End Date))-(Year(Beginning Date)*12+Month(Beginning date)))/3,1)

Example: Begin Date: 7-1-20. End Date: 6-30-21. The formula is calculating 3 Quarters, it should be 4 quarters, what did I do wrong? Thank you!!!
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Try this

Book1
ABC
101-07-202030-06-20214
Sheet1
Cell Formulas
RangeFormula
C1C1=ROUND(DATEDIF(A1,B1,"M")/3,0)
 
Upvote 0
consider the following

T202109a.xlsm
ABC
11-Jul-2030-Jun-214
2
2d
Cell Formulas
RangeFormula
C1C1=DATEDIF(A1,B1+1,"M")/3
 
Upvote 0
Using this formula is not allowing me to pickup a partial quarter - begin date 5/17/21 - shows 0 quarters and I need it to count as 1 quarter; in other words if there is one day in a previous or subsequent quarter I need that to count as a quarter. Thank you
 
Upvote 0
Using this formula is not allowing me to pickup a partial quarter - begin date 5/17/21 - shows 0 quarters and I need it to count as 1 quarter; in other words if there is one day in a previous or subsequent quarter I need that to count as a quarter. Thank you
Can you please clarify, 5/17/21 is not in a previous quarter to 6/30/21.
Do you still want that to count as 1 ?
 
Upvote 0
From 30/6/2021 to 1/7/2021 => Do you expect the result to be 1 or 2?
 
Upvote 0
Can you please clarify, 5/17/21 is not in a previous quarter to 6/30/21.
Do you still want that to count as 1 ?
We are giving bonuses to employees that worked from 7/1/2020 thru 6/30/2021; if they worked one day in any quarter, they get credit for that quarter. The bonuses will be paid based upon the number of quarters worked and FTE count. If an employee was hired and or/worked 3/29/21, then they would get credit for working the entire 1st quarter and therefore would get a total of 2 quarters credit towards their bonus. I hope that makes sense. Thank you
 
Upvote 0
Can you please clarify, 5/17/21 is not in a previous quarter to 6/30/21.
Do you still want that to count as 1 ?
yes, sorry, even though it is not a previous quarter it is at least one day in a quarter within the covered period 7/1/2020 thru 6/31/21. Thank you
 
Upvote 0
I think @Phuoc is ahead of the rest of us (or at least me), based on the question Phuoc asked.

Try this.
20210908 Inconsistent Qtr difference calculation.xlsx
ABC
1startendEligible Quarters
21/07/202030/06/20214
31/07/20201/07/20215
41/07/20201/07/20215
517/05/202130/06/20211
610/06/202130/06/20211
Final
Cell Formulas
RangeFormula
C2:C6C2=(YEAR(B2)*4+CEILING(MONTH(B2)/3,1))-(YEAR(A2)*4+CEILING(MONTH(A2)/3,1))+1
 
Upvote 0

Forum statistics

Threads
1,214,976
Messages
6,122,539
Members
449,088
Latest member
RandomExceller01

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