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)))))
or:
=INDEX(UNIQUE(ISOWEEKNUM(SEQUENCE(DAY(
EOMONTH("1/"&MONTH(B96&1), )), 1, "1/"&MONTH(B96&1)))))