The EOMONTH function in Excel returns the last day of the month before or after a given date. The syntax for the function is EOMONTH(date, num_months). The date argument is the date for which you want to find the last day of the month. The num_months argument is the number of months to go back or forward. If you omit the num_months argument, Excel defaults to 1.
The syntax of EOMONTH in Excel is as follows:
EOMONTH(start_date, number_of_months)
start_date - The start date of the calculation.
number_of_months - The number of months to include in the calculation.
EOMONTH(end_date,1) will return the last day of the month before end_date. EOMONTH(end_date,-1) will return the last day of the month before end_date. EOMONTH(start_date,1) will return the first day of the month after start_date. EOMONTH(start_date,-1) will return the first day of the month after start_date.
There are a few instances when you should not use EOMONTH in Excel. One such instance is when you are working with dates before January 1, 1900. EOMONTH will return an error in this case. Another instance is when you are working with dates that are after December 31, 9999. Again, EOMONTH will return an error. Finally, EOMONTH should not be used with text values.
EOMONTH(start_date,end_date) EOMONTH(B3,C3) EOMONTH(A3,A4) EOMONTH(DATE(2015,1,1),DATE(2015,12,31)) EOMONTH(NOW(),TODAY()) EOMONTH(B2,B3) EOMONTH(A2,A3) EOMONTH(DATE(2015,1,1),DATE(2015,1,15)) EOMONTH(NOW(),DATE()) EOMONTH(B1,B2) EOMONTH(A1,A2) EOMONTH(DATE(2015,1,1),DATE(2015,12,31))