Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default 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
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default 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


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
pay back period Kake Excel Worksheet Functions 2 May 20th 07 05:04 PM
payback period Kake Excel Worksheet Functions 2 May 19th 07 07:21 AM
Period to Period percentage change? cs120 Excel Discussion (Misc queries) 1 September 18th 05 12:05 PM
Changing text/color after a time period? metalsped Excel Discussion (Misc queries) 2 July 15th 05 05:53 PM
Isolate text following a period (".") tommcbrny Excel Worksheet Functions 2 November 9th 04 03:54 PM


All times are GMT +1. The time now is 05:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"