HomeGoogle DocsSpreadsheetIncrement Months Between Two Given Dates in Google Sheets

Increment Months Between Two Given Dates in Google Sheets

Published on

I have a start and end date. How can I increment months between these two dates? It’s possible in Google Sheets. The formula is also not complicated. In Google Sheets, you can increment months between two given dates.

I’ve been quite amazed by the different formula requirements of spreadsheet users. This formula is one among them.

Example: Increment Months Between Two Given Dates

In this Google Spreadsheet example, I have a start date in Cell A2 and end date in Cell A3. What I want is, add exactly one month to the start date and increment up to the end date.

As you can see, the start date is 5/10/2017. Then obviously the next incremented date will be 5/11/2017. You can see the result in Column C above. Below you can find the formula used in Cell C2.

The Formula to Increment Months Between Two Given Dates in Google Sheets

=ArrayFormula(edate(A2,row(A1:indirect("A"&datedif(A2,A3,"M")))))

I think you should know how this formula increment months between two given dates in Google Sheets.

Formula Explanation

To learn this formula, you may want to understand the use of the functions involved. The functions are EDATE, DATEDIF, ROW, INDIRECT and ARRAYFORMULA.

I’m trying to explain you the logic of the above formula that increments months in Google Sheets.

Do you know which is the core function in the above formula? It’s the EDATE function. Because the EDATE function can increment months based on arguments. Other functions are just feeding the arguments to EDATE.

Syntax:

EDATE(start_date, [months])

Just feed this function with a start date and months. For example, in the above example, the start date is 5/10/2017.

So the below formula which will return the date 5/11/2017.

=edate(A2,1)

or

=edate("5/10/2017",1)

To return 5/12/2017, change the second argument, i.e., 1 in the formula to 2. This’s the logic I’ve used in the above formula.

There I’ve automatically fed the formula with numbers 1,2,3 ….8 with the help of ROW function.

There I’ve auto fed months from 1 to the total number of months between the start date and end date. No clue? I’ll detail it.

The total number of months between 5/10/2017 and 11/6/2018 is 8. In my formula that increment months between two given dates, I’ve used the below formula to find the total number of months.

=datedif(A2,A3,"M")

The row function can auto feed 1 to 8 as arguments to the EDATE.

See the main formula again.

=ArrayFormula(edate(A2,row(A1:indirect("A"&datedif(A2,A3,"M")))))

Here A2 is the “start_date” argument of the EDATE function. Then the rest of the formula returns the number 1 to 8 and which is the “months” arguments.

The actual row formula is;

=ArrayFormula(row(A1:A8))

The INDIRECT and DATEDIFF function return “A8”.

That’s all. You can follow the above tutorial to increment months between two given dates in Google Sheets.

If you want to increment days, then there is another tutorial. Find it below.

Similar: How to Auto Populate Dates Between Two Given Dates in Google Sheets

Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Guide Prashanth KV brings a wealth of experience in Google Sheets and Excel, cultivated through years of work with multinational corporations in Mumbai and Dubai. As a recognized Google Product Expert in Docs Editors, Prashanth shares his expertise through insightful blogging since 2012. Explore his blog for practical tips and guidance on maximizing your spreadsheet skills.

SORT and SORTBY – Excel Vs Google Sheets

While Excel offers the SORT and SORTBY functions for sorting a table, Google Sheets...

Get Top N Values Using Excel’s FILTER Function

When using the FILTER function in Excel to extract the top N values, it's...

XLOOKUP in Excel: Working with Visible Rows in a Table

In Excel, the XLOOKUP function isn't inherently designed to exclusively work with visible rows;...

SUMPRODUCT Differences: Excel vs. Google Sheets

The core purpose of the SUMPRODUCT function remains consistent across both Excel and Google...

More like this

Interactive Random Task Assigner in Google Sheets

You have multiple tasks and multiple people. Here's a fun way to randomly assign...

Google Sheets Bar and Column Chart with Target Coloring

To color each data point in the column or bar chart according to the...

Analyzing Column A Between Non-Adjacent Values in Column B: Google Sheets

This tutorial addresses a common scenario encountered in Google Sheets: how to sum, average,...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.