Add months to a date
=EDATE(B2,C2)Excel · result on the sample sheet: 4 rows (D2:D5)
Describe what you need and get a working EDATE formula for Excel and Google Sheets, tested on real data before you copy it. EDATE returns the date a given number of months before or after a start date, keeping the same day of the month.
Each formula below was calculated on its own sample sheet. Open one to see the sheet, why it works, and to try it yourself.
=EDATE(B2,C2)Excel · result on the sample sheet: 4 rows (D2:D5)
=EDATE(A2,-12)Excel · result on the sample sheet: 5 rows (B2:B6)
=EDATE(B2,C2)-1Excel · result on the sample sheet: 5 rows (D2:D6)
=SUM(B2:B13)Excel · result on the sample sheet: 4 rows (C13:C16)
=SUMIFS($D$2:$D$12,$B$2:$B$12,$F2,$A$2:$A$12,">="&G$1,$A$2:$A$12,"<="&EOMONTH(G$1,0))Excel · result on the sample sheet: 3 rows (G2:I4)
=SUMPRODUCT((YEAR(EDATE($A$2:$A$9,6))=E2)*$C$2:$C$9)Excel · result on the sample sheet: 2 rows (F2:F3)
You describe the task in plain English, and it writes the formula, using EDATE where that's the right tool, for your table or a sample one. The formula is run in our engine in Excel and Google Sheets mode before you see it, so you get its result, not just a guess.
EDATE returns the date a given number of months before or after a start date, keeping the same day of the month.
Yes. Each example below opens a page where you try the formula in a live grid and it's checked as you go, and the EDATE function page has a practice exercise.