|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
0.通用日期表(香港4月) =
VAR start_ = date(2015,01,1)
VAR end_ = date(2016,12,31)
RETURN
ADDCOLUMNS (
CALENDAR (start_, end_ ),
"年", YEAR ( [Date] ),
"季度", QUARTER ( [Date] ),
"月", MONTH ( [Date] ),
"周", WEEKNUM ( [Date] ),
"年季度", YEAR ( [Date] ) & "Q" & QUARTER ( [Date] ),
"年月", YEAR ( [Date] ) * 100 + MONTH ( [Date] ),
"年周", YEAR ( [Date] ) * 100 + WEEKNUM ( [Date] ),
"星期几", WEEKDAY ( [Date] ),
"财年FY", IF( MONTH([Date])<=3 , "FY"&YEAR([Date])-1 , "FY"&(YEAR([Date]) )),
"财年", IF( MONTH([Date])<=3 , YEAR([Date])-1 , (YEAR([Date]) )),
"财季", IF( QUARTER([Date])=1 , "Q4" , "Q"&QUARTER([Date])-1 ),
"财月(排序用)", IF( MONTH([Date])<=3 , MONTH([Date])+9 , MONTH([Date])-3 ),
"财年财月", IF( MONTH([Date])<=3 , YEAR([Date])-1 , (YEAR([Date]) )) &"-"& IF( MONTH([Date])<=3 , MONTH([Date])+9 , MONTH([Date])-3 ),
"财年起始索引号", IF( MONTH([Date])<=3 && YEAR([Date])=YEAR(start_), 0, (IF( MONTH([Date])<=3 , YEAR([Date])-1 , (YEAR([Date]) ))-YEAR(start_))*12+4
)) |
评分
-
1
查看全部评分
-
|