Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel, displaying last quarter 2

Status
Not open for further replies.

Sopman

Technical User
Joined
Mar 21, 2001
Messages
206
Location
US
I input data from the previous quarter in a spreadsheet and I put the dates in a cell. Example: today I'm working on last quarter and the dates are, in this format, January 1 to March 31, 2003.

Is they a formula I can enter into a cell to have the previous quarter date displayed?

Sopman
 
Hi,
If your dates are in column A with heading DATES, then in A2 enter the starting date and in the next cell, A3, enter...
Code:
=A2+1
and then copy that formula down until you have the range of dates that you want (thru row 91 I would surmize).

Now all you need to do is enter a new starting date when you want to do another quarter.

Hope this helps :-) Skip,
Skip@TheOfficeExperts.com
 
Skip,
I should not have said "dates". My spreadsheet is a template and in one cell, say A18, I want it to say 1 January to March 31, 2003.

When I open the template again on July 1st for the second quarter I want the date to read April 1 to June 30, 2003.

Sopman
 
Well there is two parts to your question.

1. What is a formula to calculate the previous quarter from the current date
A1 contains the current date
A2 contains first formula
B2 contains second formula
c2 contains third formula
Code:
=IF(MONTH(A1)<4,4,IF(MONTH(A1)<7,1,IF(MONTH(A1)<10,2,3)))
=IF($A2=0,&quot;January&quot;,IF($A2=1,&quot;April&quot;,IF($A2=2,&quot;July&quot;,&quot;Ocotber&quot;)))
=IF($A2=0,&quot;March&quot;,IF($A2=1,&quot;June&quot;,IF($A2=2,&quot;September&quot;,&quot;December&quot;)))

2. How can that quarter's date range be displayed.
[/code]
=&quot;1 &quot;&B2&&quot; to 1 &quot;&C2&&quot;, &quot;&IF(A2=3,YEAR(A1)-1,YEAR(A1))
[/code]
Hope this helps :-) Skip,
Skip@TheOfficeExperts.com
 

This should do the trick for you:

=IF(MONTH(NOW())>9,&quot;1st July to 30th September &quot; & year(now()),IF(MONTH(NOW())>6,&quot;1st April to 30th June &quot; & Year(now()),IF(MONTH(NOW())>3,&quot;1st January to 31st March &quot; & year(now()),&quot;1st October to 31st December &quot; & year(now())-1))) Rgds
Geoff
&quot;Some cause happiness wherever they go; others whenever they go.&quot;
-Oscar Wilde
 
Thank you Geoff and Skip. They both work well.

Sopman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top