The EOMONTH function in Google Sheets is a useful tool for financial analysts and anyone dealing with date calculations. This function simplifies the process of determining the last day of a month that is a specified number of months before or after a given date, allowing users to effectively manage deadlines, projections, and reports.
Syntax
EOMONTH(start_date, months)
- start_date: The initial date from which to calculate.
- months: The number of months to add (positive number) or subtract (negative number) from the start_date.
Example #1
EOMONTH("2023-01-15", 2)
This function calculates the last day of the month that is 2 months after January 15, 2023, which would return 2023-03-31.
Example #2
EOMONTH("2023-07-30", -1)
This function finds the last day of the month that is 1 month before July 30, 2023, resulting in 2023-06-30.
Example #3
EOMONTH("2023-12-01", 0)
This function returns the last day of December 2023, which is 2023-12-31.
Error handling
- VALUE! – This error occurs when the start_date is not recognized as a valid date format.
- NUM! – This happens when the months argument is not a numeric value.