ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Quarter Dates (https://www.excelbanter.com/excel-worksheet-functions/116695-quarter-dates.html)

LR

Quarter Dates
 
I have a column A which can have different dates.
As


July 07
Feb 08
Apr 08
May 08
Oct 08
Nov 09

In column B I would like to have dates that correspond to the quarterly
periods Dec, March,
June,September.

For example in column B, I would like to see

June 07
March 08
march 08
June 08 etc.

Is there a formula that could be applied to column B to get the dates
as above.

Thanks


Roger Govier

Quarter Dates
 
Hi

Try entering in B1
=TEXT(DATE(YEAR(A1),(INT((MONTH(A1)-1)/3)+1)*3,1),"mmm yy")
and copy down
--
Regards

Roger Govier


"LR" wrote in message
ups.com...
I have a column A which can have different dates.
As


July 07
Feb 08
Apr 08
May 08
Oct 08
Nov 09

In column B I would like to have dates that correspond to the
quarterly
periods Dec, March,
June,September.

For example in column B, I would like to see

June 07
March 08
march 08
June 08 etc.

Is there a formula that could be applied to column B to get the dates
as above.

Thanks




Bob Phillips

Quarter Dates
 
I think he wants

=DATE(YEAR(A1),(INT((MONTH(A1)-4)/3)+1)*3,1)

formatted as mmm-yy

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Roger Govier" wrote in message
...
Hi

Try entering in B1
=TEXT(DATE(YEAR(A1),(INT((MONTH(A1)-1)/3)+1)*3,1),"mmm yy")
and copy down
--
Regards

Roger Govier


"LR" wrote in message
ups.com...
I have a column A which can have different dates.
As


July 07
Feb 08
Apr 08
May 08
Oct 08
Nov 09

In column B I would like to have dates that correspond to the
quarterly
periods Dec, March,
June,September.

For example in column B, I would like to see

June 07
March 08
march 08
June 08 etc.

Is there a formula that could be applied to column B to get the dates
as above.

Thanks






Roger Govier

Quarter Dates
 
Bob, I had thought about -4 rather than -1, but his example of
Jul 07 Jun 07
Feb 08 Mar 08
etc.

rather threw all options, so I had decided his examples were not real.

You are probably correct though, and he may just have missed out one of
his months in the second set of values

--
Regards

Roger Govier


"Bob Phillips" wrote in message
...
I think he wants

=DATE(YEAR(A1),(INT((MONTH(A1)-4)/3)+1)*3,1)

formatted as mmm-yy

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Roger Govier" wrote in message
...
Hi

Try entering in B1
=TEXT(DATE(YEAR(A1),(INT((MONTH(A1)-1)/3)+1)*3,1),"mmm yy")
and copy down
--
Regards

Roger Govier


"LR" wrote in message
ups.com...
I have a column A which can have different dates.
As


July 07
Feb 08
Apr 08
May 08
Oct 08
Nov 09

In column B I would like to have dates that correspond to the
quarterly
periods Dec, March,
June,September.

For example in column B, I would like to see

June 07
March 08
march 08
June 08 etc.

Is there a formula that could be applied to column B to get the
dates
as above.

Thanks








Bob Phillips

Quarter Dates
 
It was definitely confusing Roger.

"Roger Govier" wrote in message
...
Bob, I had thought about -4 rather than -1, but his example of
Jul 07 Jun 07
Feb 08 Mar 08
etc.

rather threw all options, so I had decided his examples were not real.

You are probably correct though, and he may just have missed out one of
his months in the second set of values

--
Regards

Roger Govier





Ken Wright

Quarter Dates
 
If your dates are real dates then you may want to consider a Pivot table
which will group into Quarters in a heartbeat. All depends on your data
really, but once you've been there you won't look back.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------
It's easier to beg forgiveness than ask permission :-)



"LR" wrote:

I have a column A which can have different dates.
As


July 07
Feb 08
Apr 08
May 08
Oct 08
Nov 09

In column B I would like to have dates that correspond to the quarterly
periods Dec, March,
June,September.

For example in column B, I would like to see

June 07
March 08
march 08
June 08 etc.

Is there a formula that could be applied to column B to get the dates
as above.

Thanks



LR

Quarter Dates
 
Thanks guys. But the examples are real. What I wanted is if there is a
month which falls outside the designated quarter months, then it should
revert back to one of the quarter months So you could have any set of
scenarios of dates falling outside the quarter months. For example if
the date is in july, or august it should revert back to either June or
september. Or if the date is january or February it should revert back
to either December or March as quarter period.

This is an acutal scenario.





LR wrote:
I have a column A which can have different dates.
As


July 07
Feb 08
Apr 08
May 08
Oct 08
Nov 09

In column B I would like to have dates that correspond to the quarterly
periods Dec, March,
June,September.

For example in column B, I would like to see

June 07
March 08
march 08
June 08 etc.

Is there a formula that could be applied to column B to get the dates
as above.

Thanks



Bob Phillips

Quarter Dates
 
What is the relevance of an actual scenario? What Roger and I gave applies
to test data, real data, imaginary data, etc. They are solutions to a
problem, so they either work or they don't. If they do, great, if they
don't, in what way?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"LR" wrote in message
ups.com...
Thanks guys. But the examples are real. What I wanted is if there is a
month which falls outside the designated quarter months, then it should
revert back to one of the quarter months So you could have any set of
scenarios of dates falling outside the quarter months. For example if
the date is in july, or august it should revert back to either June or
september. Or if the date is january or February it should revert back
to either December or March as quarter period.

This is an acutal scenario.





LR wrote:
I have a column A which can have different dates.
As


July 07
Feb 08
Apr 08
May 08
Oct 08
Nov 09

In column B I would like to have dates that correspond to the quarterly
periods Dec, March,
June,September.

For example in column B, I would like to see

June 07
March 08
march 08
June 08 etc.

Is there a formula that could be applied to column B to get the dates
as above.

Thanks





Roger Govier

Quarter Dates
 
Hi

For example if the date is in july, or august it should revert back to
either June or september

You can only have one
- it is either going back to the previous quarter date which Bob's
solution provides
or
- it goes forward to the next quarter date, which my solution provides

July, August and September can all be treated as June, or they can all
be treated as September

--
Regards

Roger Govier


"LR" wrote in message
ups.com...
Thanks guys. But the examples are real. What I wanted is if there is
a
month which falls outside the designated quarter months, then it
should
revert back to one of the quarter months So you could have any set of
scenarios of dates falling outside the quarter months. For example if
the date is in july, or august it should revert back to either June or
september. Or if the date is january or February it should revert back
to either December or March as quarter period.

This is an acutal scenario.





LR wrote:
I have a column A which can have different dates.
As


July 07
Feb 08
Apr 08
May 08
Oct 08
Nov 09

In column B I would like to have dates that correspond to the
quarterly
periods Dec, March,
June,September.

For example in column B, I would like to see

June 07
March 08
march 08
June 08 etc.

Is there a formula that could be applied to column B to get the dates
as above.

Thanks






All times are GMT +1. The time now is 09:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com