DATEDELTA(DATEINWEEK(DATE($年,$月,1),1),($周-1)*7) 周一
DATEDELTA(DATEINWEEK(DATE($年,$月,1),-1),($周-1)*7) 周日


------------
IF(DATE($年,$月,1)>DATEDELTA(DATEINWEEK(DATE($年,$月,1),1),($周-1)*7),DATE($年,$月,1),DATEDELTA(DATEINWEEK(DATE($年,$月,1),1),($周-1)*7))
IF(DATEDELTA(DATEINWEEK(DATE($年,$月,1),-1),($周-1)*7)>DATEINMONTH(DATE($年,$月,1),-1),DATEINMONTH(DATE($年,$月,1),-1),DATEDELTA(DATEINWEEK(DATE($年,$月,1),-1),($周-1)*7))