Home > Mobile >  How to get a list of the corresponding calendar weeks of a specific month (for example of december)
How to get a list of the corresponding calendar weeks of a specific month (for example of december)

Time:12-23

I only have the month specification in words "december" or as a number "12". Now I want to get the corresponding calender weeks in a list. For december 2022 it should be 48,49,50,51 and 52.

How can I do that?

CodePudding user response:

use:

=LAMBDA(aix,UNIQUE(FILTER(WEEKNUM(aix,21),MONTH(aix)=12)))(SEQUENCE(365,1,DATE(2022,1,1),1))

CodePudding user response:

try:

=INDEX(UNIQUE(WEEKNUM(SEQUENCE(DAY(
 EOMONTH("1/"&MONTH(B96&1), )), 1, "1/"&MONTH(B96&1)))))

enter image description here

or:

=INDEX(UNIQUE(ISOWEEKNUM(SEQUENCE(DAY(
 EOMONTH("1/"&MONTH(B96&1), )), 1, "1/"&MONTH(B96&1)))))

enter image description here

  • Related