D2 下拉=LOOKUP(1,0/(MOD(EOMONTH(B$2,ROW(A1)-2)+ROW(INDIRECT("1:"&DAY(EOMONTH(B$2,ROW(A1)-1))))-2,7)=4),EOMONTH(B$2,ROW(A1)-2)+ROW(INDIRECT("1:"&DAY(EOMONTH(B$2,ROW(A1)-1)))))
E2=WEEKDAY(D2,2)
另解 D2{=MAX((MOD(EOMONTH(B$2,ROW(A1)-2)+ROW($1:$31)-2,7)=4)*(MONTH(EOMONTH(B$2,ROW(A1)-2)+ROW($1:$31))=MOD(MONTH(B$2)+ROW(A1)-2,12)+1)*(EOMONTH(B$2,ROW(A1)-2)+ROW($1:$31)))
留言
張貼留言