简体   繁体   English

如何为这个excel公式设置四月的第一周? =WEEKNUM(A1)

[英]how can I set the first week of april for this excel formula? =WEEKNUM(A1)

How can I set the first day and week of April for this excel formula?如何为这个excel公式设置四月的第一天和第一周? =WEEKNUM(A1) Because =WEEKNUM(A1) only works for January 1 or the first week of January. =WEEKNUM(A1) 因为 =WEEKNUM(A1) 仅适用于 1 月 1 日或 1 月的第一周。

Because our company Financial/Fiscal Year starts on April 1st.因为我们公司的财务/会计年度从 4 月 1 日开始。 I need to get the week number of each day in a year and it's corresponding WEEKNUMBER, but the First day should be April 1 and not January 1. I will use this on my Time Dimension worksheet that I will import through ETL(SSIS)我需要获取一年中每一天的周数,它是对应的 WEEKNUMBER,但第一天应该是 4 月 1 日而不是 1 月 1 日。我将在我将通过 ETL(SSIS) 导入的时间维度工作表中使用它

Thanks and Regards,感谢和问候,

Beau

通过从中减去一月、二月和三月的天数来转换 A1 日期(这当然取决于闰年的年份):

=WEEKNUM(A1-(1 + DATE(YEAR(A1),3,31)-DATE(YEAR(A1),1,1)))

I hope this works for someone.我希望这对某人有用。 I had the same issue.我有同样的问题。

=IF((WEEKNUM(D4,16)-13)<=0,(WEEKNUM(D4,16)-13)+53,WEEKNUM(D4,16)-13)

"D4" is the current date “D4”是当前日期

"16" is the day your fiscal year starts “16”是您财政年度的开始日

The "-13" is the amount of weeks from 1/1/year to the first week that your fiscal year starts “-13”是从 1/1/year 到您的财政年度开始的第一周的周数

试试这个

=WEEKNUM(DATEDIF("4/1/2018",TODAY()-1,"D"))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM