ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   One text for particular period (https://www.excelbanter.com/excel-worksheet-functions/228526-one-text-particular-period.html)

kashish

One text for particular period
 
If A1 = Any date, I need a formula for A2 with conditions like

If A1 between 01 Jan 2009 to 31 Mar 2009 then A2 = Q1
If A1 between 01 Apr 2009 to 30 Jun 2009 then A2 = Q2
If A1 between 01 Jul 2009 to 30 Sep 2009 then A2 = Q3
If A1 between 01 Oct 2009 to 31 Dec 2009 then A2 = Q4

Mike H

One text for particular period
 
Try

=INT((MONTH(A1)-1)/3)+1

Mike

"kashish" wrote:

If A1 = Any date, I need a formula for A2 with conditions like

If A1 between 01 Jan 2009 to 31 Mar 2009 then A2 = Q1
If A1 between 01 Apr 2009 to 30 Jun 2009 then A2 = Q2
If A1 between 01 Jul 2009 to 30 Sep 2009 then A2 = Q3
If A1 between 01 Oct 2009 to 31 Dec 2009 then A2 = Q4


Mike H

One text for particular period
 
I forgot the Q

="Q"&INT((MONTH(A1)-1)/3)+1

Mike

"Mike H" wrote:

Try

=INT((MONTH(A1)-1)/3)+1

Mike

"kashish" wrote:

If A1 = Any date, I need a formula for A2 with conditions like

If A1 between 01 Jan 2009 to 31 Mar 2009 then A2 = Q1
If A1 between 01 Apr 2009 to 30 Jun 2009 then A2 = Q2
If A1 between 01 Jul 2009 to 30 Sep 2009 then A2 = Q3
If A1 between 01 Oct 2009 to 31 Dec 2009 then A2 = Q4


Glenn

One text for particular period
 
kashish wrote:
If A1 = Any date, I need a formula for A2 with conditions like

If A1 between 01 Jan 2009 to 31 Mar 2009 then A2 = Q1
If A1 between 01 Apr 2009 to 30 Jun 2009 then A2 = Q2
If A1 between 01 Jul 2009 to 30 Sep 2009 then A2 = Q3
If A1 between 01 Oct 2009 to 31 Dec 2009 then A2 = Q4



="Q"&INT(MONTH(A1)/4)+1

Glenn

One text for particular period
 
Glenn wrote:
kashish wrote:
If A1 = Any date, I need a formula for A2 with conditions like

If A1 between 01 Jan 2009 to 31 Mar 2009 then A2 = Q1
If A1 between 01 Apr 2009 to 30 Jun 2009 then A2 = Q2
If A1 between 01 Jul 2009 to 30 Sep 2009 then A2 = Q3
If A1 between 01 Oct 2009 to 31 Dec 2009 then A2 = Q4



="Q"&INT(MONTH(A1)/4)+1



Right, like Mike H said...

="Q"&INT((MONTH(A1)-1)/3)+1

Dave Peterson

One text for particular period
 
I like this formula in general--if the fiscal year starts on the first of month
number #:
="FY"&YEAR(A1)-(MONTH(A1)<#)&"-Q"&INT(1+MOD(MONTH(A1)-#,12)/3)

So if the fiscal year starts on April 1st, then I'd use:
="FY"&YEAR(A1)-(MONTH(A1)<4)&"-Q"&INT(1+MOD(MONTH(A1)-4,12)/3)

I also like this style of result:
FY2009-Q1

kashish wrote:

If A1 = Any date, I need a formula for A2 with conditions like

If A1 between 01 Jan 2009 to 31 Mar 2009 then A2 = Q1
If A1 between 01 Apr 2009 to 30 Jun 2009 then A2 = Q2
If A1 between 01 Jul 2009 to 30 Sep 2009 then A2 = Q3
If A1 between 01 Oct 2009 to 31 Dec 2009 then A2 = Q4


--

Dave Peterson


All times are GMT +1. The time now is 11:46 PM.

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