下午好!
我在excel中,我想知道是否有办法获得两个特定日期之间涵盖的所有财政年度和季度的清单。
我有奖励开始和结束日期字段。例如:
start date: 7/6/2012
end date: 10/7/2016
有没有办法获得所有财政年度和季度的产出?像这样:
FY13 Q1
FY13 Q2, FY13 Q3, FY13 Q4, FY14 Q1, FY14 Q2, FY14 Q3, FY14 Q4, FY15 Q1, FY15 Q2,
FY15 Q3, FY15 Q4, FY16 Q1, FY16 Q2, FY16 Q3, FY16 Q4, FY17 Q1
答案 0 :(得分:0)
让我们首先建立基于财年结束的下个月\年度季度关系:
假设开始日期和结束日期位于__init__
,而结果日期为B2:C3
,则输入以下公式:
财年结束 - 三月
C5:F25
中的:
C7
=IF($C$3<$C$2,"!Err",
CONCATENATE("FY",
LOOKUP(MONTH($C$2),{1,4},{0,1})+TEXT($C$2,"yy"),
" Q",LOOKUP(MONTH($C$2),{1,4,7,10},{4,1,2,3})))
中的:
C8:C25
会计年度结束 - 六月
=IF(OR(EXACT(C7,""),
EXACT(C7,
CONCATENATE("FY",
LOOKUP(MONTH($C$3),{1,4},{0,1})+TEXT($C$3,"yy"),
" Q",LOOKUP(MONTH($C$3),{1,4,7,10},{4,1,2,3})))),"",
CONCATENATE("FY",
MID(C7,3,2)+IF(RIGHT(C7,1)-4=0,1,0),
" Q",CHOOSE(RIGHT(C7,1),2,3,4,1)))
中的:
D7
=IF($C$3<$C$2,"!Err",
CONCATENATE("FY",
LOOKUP(MONTH($C$2),{1,7},{0,1})+TEXT($C$2,"yy"),
" Q",LOOKUP(MONTH($C$2),{1,4,7,10},{3,4,1,2})))
中的:
D8:D25
财年结束 - 九月
=IF(OR(EXACT(D7,""),
EXACT(D7,
CONCATENATE("FY",
LOOKUP(MONTH($C$3),{1,4},{0,1})+TEXT($C$3,"yy"),
" Q",LOOKUP(MONTH($C$3),{1,4,7,10},{3,4,1,2})))),"",
CONCATENATE("FY",
MID(D7,3,2)+IF(RIGHT(D7,1)-4=0,1,0),
" Q",CHOOSE(RIGHT(D7,1),2,3,4,1)))
中的:
E7
=IF($C$3<$C$2,"!Err",
CONCATENATE("FY",
LOOKUP(MONTH($C$2),{1,10},{0,1})+TEXT($C$2,"yy"),
" Q",LOOKUP(MONTH($C$2),{1,4,7,10},{2,3,4,1})))
中的:
E8:E25
会计年度结束 - 12月
=IF(OR(EXACT(E7,""),
EXACT(E7,
CONCATENATE("FY",
LOOKUP(MONTH($C$3),{1,10},{0,1})+TEXT($C$3,"yy"),
" Q",LOOKUP(MONTH($C$3),{1,4,7,10},{2,3,4,1})))),"",
CONCATENATE("FY",
MID(E7,3,2)+IF(RIGHT(E7,1)-4=0,1,0),
" Q",CHOOSE(RIGHT(E7,1),2,3,4,1)))
中的:
F7
=IF($C$3<$C$2,"!Err",
CONCATENATE("FY",
TEXT($C$2,"yy"),
" Q",LOOKUP(MONTH($C$2),{1,4,7,10},{1,2,3,4})))
中的:
F8:F25