Sub 月末を取得する_指定の年と月() 指定の年 = Range("B1") 指定の月 = Range("B2") MsgBox DateSerial(指定の年, 指定の月 + 1, 0) '0で前月月末 End Sub