EOMONTH(date,days) EOMONTH returns the last day of the month before or after the date you specify.
For example, the following formula returns October 31, 2017:
EOMONTH(A2,30)
The following formula returns November 30, 2017:
EOMONTH(A2,-1)
EOMONTH is a function in Google Sheets that calculates the last day of the month for a given year. The syntax is as follows:
=EOMONTH(year, month)
For example, if you want to find the last day of the month for September 2017, you would use the following formula:
=EOMONTH(2017, 9)
EOMONTH(end_date,1) will give you the last day of the month before end_date.
EOMONTH(end_date,-1) will give you the last day of the month after end_date.
There are a few occasions when you should not use EOMONTH in Google Sheets. One example is when you want to calculate the number of days between two dates, rather than the number of months. In this case, you would use the DATEDIF function. Another time you should not use EOMONTH is when you want to calculate the number of days until a given date. In this case, you would use the DATE function.
The EOMONTH function in Google Sheets returns the last day of the month corresponding to the supplied date.
EOMONTH(A2,0) will return the last day of the month before A2.
EOMONTH(A2,1) will return the last day of the month after A2.
EOMONTH(A2,2) will return the last day of the month two months after A2.
EOMONTH(A2,3) will return the last day of the month three months after A2.
EOMONTH(A2,4) will return the last day of the month four months after A2.
EOMONTH(A2,5) will return the last day of the month five months after A2.
EOMONTH(A2,6) will return the last day of the month six months after A2.
EOMONTH(A2,7) will return the last day of the month seven months after A2.
EOMONTH(A2,8) will return the last day of the month eight months after A2.
EOMONTH(A2,9) will return the last day of the month nine months after A2.
EOMONTH(A2,10) will return the last day of the month ten months after A2.