简体   繁体   中英

How to get month number by week number? Google Sheets

I have a column with weeknumbers incrementing from 1 to 42. Next to it I would like to have the corresponding monthnumbers from 1 to 12. So eg next to week 1, 2, 3 it would be month 1.

How would I achieve this in google sheets?

这就是它的样子

Best Florian

A week number may span a month end, so two different months for different days in the same week. ie

Not possible.

It's possible if you'll count concrete dates.

A1:

=ARRAYFORMULA( (ROW(INDIRECT("a1:a"&42)) - 1) * 7 + today())

  • adjust the date, change today() to your start date.

B1:

=FILTER(WEEKNUM(A1:A,1),A1:A<>"")

  • adjust week type if needed, change 1

C1:

=FILTER(MONTH(A1:A),A1:A<>"")

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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