EDATE Function – Add Months to Date (Excel, VBA, G Sheets)
Written by
Reviewed by
Download the example workbook
This tutorial demonstrates how to use the EDATE Function in Excel to add or subtract months to a date.
EDATE Examples
Add Months to a Date
The EDATE Function is used to add months to a date:
Add One Month
=EDATE(B3,1)
Add Six Months
=EDATE(B3,6)
Subtract Months From a Date
The EDATE Function can also be used to subtract months from a date.
Subtract One Month
=EDATE(B3,-1)
Subtract Six Months
=EDATE(B3,-6)
What About End of the Month?
If the day of the start date is greater than the number of days in the end month, the last day of the month will be displayed:
The reverse is not true.
To ensure you get the last day of the month, you can use the EOMONTH Function instead:
=EOMONTH(B3,1)
EDATE in Google Sheets
The EDATE Function works exactly the same in Google Sheets as in Excel:
EDATE Examples in VBA
You can also use the EDATE function in VBA. Type:
Application.Worksheetfunction.Edate(start_date,months)
For the function arguments (start_date, etc.), you can either enter them directly into the function, or define variables to use instead.