calculate the month from the year and week number in excel

前端 未结 3 826
野的像风
野的像风 2020-12-13 16:29

In Excel 2007 I have a Year number and Week number and I want to work out the Month number.

The catch is that in my case the start of every week is a monday, so some

3条回答
  •  一生所求
    2020-12-13 16:55

    The ISO Week always contain January 4th, so let's get its weekday starting with monday (obviously "year" is the cell with the year):

    WEEKDAY(DATE(year;1;4))
    

    This is the number of days we need to go back from that date to find a monday (plus one)

    DATE(year;1;4)-WEEKDAY(DATE(year;1;4))+1
    

    So now we just need to count on...

    DATE(year;1;4)-WEEKDAY(DATE(year;1;4))+1+weeknumber*7
    

提交回复
热议问题