Calculate last quater from today (given Fiscal Year end)

时光怂恿深爱的人放手 提交于 2020-01-07 05:06:50

问题


I have as input a "Fiscal Year end", which determines the quarter ends of a company. Say:

today() is 3-April-2015
Company fiscal year ends: Oct-14

then I should get the latest quarter end : Jan-15
i.e the latest quarter end from the company fiscal year end till today's date.

With:

FiscalEnd=12/02/2014
Today() (a3)  =04/03/2015

I have tried:

=TEXT(EOMONTH(Fiscal_Year_EndQ,MOD(-MONTH(A3),3)-3),"mmm-yy")

and am getting Nov-14.

Example:
Fiscal Year ends at: 31-Oct-2014
Today's date: 4 April 2015

List of QUARTER
aug-oct 2014
nov-jan 2015
feb-april 2015

So here I should get Jan-15 as last fiscal quarter end.


回答1:


I think:

=EOMONTH(A1,-MOD(MONTH(A1)-2,3)-1)  

formatted as mmm-yy may serve.




回答2:


The standard formula to give quarters is:

=CHOOSE(CEILING(MONTH(A1)/3,1),"Q1","Q2","Q3","Q4")

where A1 contains the date in question. But your fiscal year starts on October 15th. So this formula must be offset by the difference between January 1st and October 15th:

=CHOOSE(CEILING(MONTH(A1-288)/3,1),"Q1","Q2","Q3","Q4")

EDIT#1:

In A2 enter today's date. In B2 enter:

=CHOOSE(CEILING(MONTH(A2-305)/3,1),1,2,3,4)

In C2 enter:

=IF(B2-1=0,4,B2-1)

In D2 enter:

=CHOOSE(C2,"Jan","Apr","Jul","Oct")

For example:



来源:https://stackoverflow.com/questions/29430460/calculate-last-quater-from-today-given-fiscal-year-end

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!