• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

write current quarter after previous quarter

susmitha

New Member
I have uploaded a excel sheet in which there are different year and quarters. The previous quarter is FYQ4Q2. I want to write a code where it automatically writes the current quarter (fy14q3) after previous quarter and shift the calculations.
Ex: Fy14q2 has couple of formulas in it . when inserted a current quarter the formulas in fy14q2 should shift to fy14q3. similarly other table at the right.
How do i achieve this. and the formulas i am using for previous quarter and current quarter are current quarter="FY" & RIGHT(YEAR(TODAY()),2)&"Q" & ROUNDUP(MONTH(TODAY()/3),0)
previous quarter="FY" & RIGHT(YEAR(TODAY()),2)&"Q" & ROUNDUP(MONTH(TODAY()/6),0)
Please help
 

Attachments

Hi,
I use a trick for this. I store the values as numbers like 121 for FY12Q1 (number format = "FY"0Q0).
Then, if cell A1 has a quarter (say 121),
- next period =+A1+1+6*(MOD(A1,10)=4)
- prev period =+A1-1-6*(MOD(A1,10)=1)
And use the custom format everywhere for correct display.


Anand
 
Back
Top