Use the EOMONTH function to determine the last day of a month
To find the last day of a month, use the EOMONTH function: (EOMONTH(start_date, offset_months)).
This function returns the date of the last day of the month, offset_months from start_date. If you try to use this function and it doesn’t work, you may need to load the Analysis ToolPak add-in. In Excel 2003, Select Add-Ins… from the Tools menu bar and select Analysis ToolPak. In Excel 2007, select Excel options from the Office Main Menu, selct Add-ins in the left pane and select the Analysis ToolPak add-in then select Go and make sure that the add-in is checked. Here is how we’ll use the function:
How to determine the last day of a month using the EOMONTH Function
- In cells A2:A10 enter some dates.
- In cells B2:B10 enter the desired offset from the start date (positive or negative values).
- Select cells C2:C10 and type the following formula: =EOMONTH(A2,B2).
- Press Ctrl+Enter.
This tip is compatible with Microsoft Excel 97, 2000, 2003 and 2007.
- How to Use the WEEKNUM function to determine the week number
- How to use the WORKDAY function to calculate workdays in Excel
- Use the NETWORKDAYS function to determine number of workdays
- How to Use the EDATE function to calculate months in Excel
- Use the DAYS360 function to calculate with a 360-day year
