I want to know an excel formula to calculate the how many quarter falls between 2 dates?
Suppose,one date is 22/05/2013 and other date is 05/02/2014.Then the total quarter should be 4.
Quarter criteria should be:-
Jan~Mar
Apr~Jun
Jul~Sep
Oct~Dec
Date fall in the above range should count 1 Quarter.22/05/2013 falls in 'Apr~Jun' and 05/02/2014 falls in 'Jan~Mar,then,total Quarter are 4.
Can it be calculate through an excel formula?'
How many Quarter between 2 dates?
-
- Lounger
- Posts: 26
- Joined: 20 Jan 2014, 11:18
- Location: nepal
How many Quarter between 2 dates?
You do not have the required permissions to view the files attached to this post.
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: How many Quarter between 2 dates?
Attached...
You do not have the required permissions to view the files attached to this post.
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- gamma jay
- Posts: 25455
- Joined: 17 Mar 2010, 17:33
- Location: Cape Town
Re: How many Quarter between 2 dates?
As for your other question about VBA form, see if this works for you.
You do not have the required permissions to view the files attached to this post.
Regards,
Rudi
If your absence does not affect them, your presence didn't matter.
Rudi
If your absence does not affect them, your presence didn't matter.
-
- Administrator
- Posts: 12632
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
Re: How many Quarter between 2 dates?
Rudi,
Thanks for answering both questions in this thread. I was trying to decide whether to unlock the other one again when you resolved the issue anyway!
Thanks for answering both questions in this thread. I was trying to decide whether to unlock the other one again when you resolved the issue anyway!
StuartR
-
- Lounger
- Posts: 26
- Joined: 20 Jan 2014, 11:18
- Location: nepal
Re: How many Quarter between 2 dates?
Rudi Sir,in excel file attach by you,the formula is showing 2 quarter instead of 3 as I want.Have a look into the formula once again.
But Rudi sir,look into VBA Codes file ,in this file one date is 22/05/2013 and other is 05/02/2014 and the quarter should be 4 instead of 3 as per your solution.Request you to please look once again.The criteria should be Jan~Mar,Apr~Jun,Jul~Sep and Oct~Dec.Date first is falling into Apr~Jun and other date i.e.05/02/2014 is falling into Jan~Mar.Therefore,it should be 4.
Regards
Renu
But Rudi sir,look into VBA Codes file ,in this file one date is 22/05/2013 and other is 05/02/2014 and the quarter should be 4 instead of 3 as per your solution.Request you to please look once again.The criteria should be Jan~Mar,Apr~Jun,Jul~Sep and Oct~Dec.Date first is falling into Apr~Jun and other date i.e.05/02/2014 is falling into Jan~Mar.Therefore,it should be 4.
Regards
Renu
-
- Administrator
- Posts: 78657
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: How many Quarter between 2 dates?
Does this do what you want?
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans
Hans
-
- Lounger
- Posts: 26
- Joined: 20 Jan 2014, 11:18
- Location: nepal
Re: How many Quarter between 2 dates?
Yes Hans that is the solution which I want.Thanks a lot for your effort.
Sir,request you to please suggest/amend an excel formula as attach by Mr.Rudi,that is not my requirement.
Sir,request you to please suggest/amend an excel formula as attach by Mr.Rudi,that is not my requirement.
-
- Lounger
- Posts: 26
- Joined: 20 Jan 2014, 11:18
- Location: nepal
Re: How many Quarter between 2 dates?
Hans Sir,sorry for the not looking proper text.Please correct the last text in your attach file of macro as 'Quarter'instead of 'Total Days'.
-
- Administrator
- Posts: 78657
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: How many Quarter between 2 dates?
In D5:
=DATEDIF(DATE(YEAR(B5), MONTH(B5)-MOD(MONTH(B5)-1,3),1),DATE(YEAR(C5), MONTH(C5)-MOD(MONTH(C5)-1,3),1),"m")/3+1
Excel may format the result as a date. Simply set the number format to General.
Fill down the formula as far as needed.
=DATEDIF(DATE(YEAR(B5), MONTH(B5)-MOD(MONTH(B5)-1,3),1),DATE(YEAR(C5), MONTH(C5)-MOD(MONTH(C5)-1,3),1),"m")/3+1
Excel may format the result as a date. Simply set the number format to General.
Fill down the formula as far as needed.
Best wishes,
Hans
Hans
-
- Administrator
- Posts: 78657
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: How many Quarter between 2 dates?
You can change the Caption property of the label yourself.RENU1973 wrote:Hans Sir,sorry for the not looking proper text.Please correct the last text in your attach file of macro as 'Quarter'instead of 'Total Days'.
Best wishes,
Hans
Hans
-
- Lounger
- Posts: 26
- Joined: 20 Jan 2014, 11:18
- Location: nepal
Re: How many Quarter between 2 dates?
Thank you Hans for both the reply.Now Glad to find the right solution.
Many-2 thanks to you once again.
Regards
Renu
Many-2 thanks to you once again.
Regards
Renu