Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Incrementing Months in Dates.

Incrementing Months in Dates

Written by Allen Wyatt (last updated September 11, 2021)
This tip applies to Excel 97, 2000, 2002, and 2003


Hiren has a series of dates in a worksheet. He would like to increment the month, so that (for instance) August becomes September in the dates. He wonders if there a way this can be done using Find and Replace.

You actually could use Find and Replace to do the changing. For instance, let's assume that the date shown in the cell range is 8/1/13 through 8/31/13. You could do a search for "8/" (without the quote marks) and replace it with "9/" (again, without the quotes).

There are a couple of problems with this approach, however. First, you'll end up making changes that you probably don't want to make. For instance, 8/18/13 is changed to 9/19/13 because there are two instances of 8/ in the original value. Second, when you change 8/31/13 to 9/31/13, Excel treats the converted date as text rather than as a date because 9/31 is not a valid date. In addition, you'll need to modify what you are searching for and replacing with based upon how the date is formatted in the cells.

A better solution is to use a formula to do the incrementing. If you have the Analysis ToolPak enabled in Excel, you can use the following formula:

=EDATE(A1,1)

The formula works great at incrementing the month. You need to understand how the formula works when the result of incrementing the month results in an invalid date. For instance, if the original date is 8/31/13 and you use the formula, it returns 9/30/13, the last valid day in September.

If you want, instead, to see an error when trying to increment, then the formula can be adjusted to compensate:

=IF(DAY(EDATE(A1,1))<DAY(A1),NA(),EDATE(A1,1))

This formula compares the date of the converted date to the day of the original date, and if they are not the same then it returns an #N/A error.

If you want, instead, to have the invalid date "fall over" to the next month (so that 8/31/13, when incremented, becomes 10/1/13), then you can use a different formula that doesn't rely on EDATE:

=DATE(YEAR(A1),MONTH(A1)+1,DAY(A1))

This formula will, interestingly enough, handle the "end of the year wrap" correctly. Thus, an original date in A1 of 12/1/13 will become 13/1/13 which is translated by Excel as 1/1/14.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9263) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Incrementing Months in Dates.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Quickly Displaying the Page Setup Dialog Box

The Page Setup dialog box is indispensable in setting up the overall look of your document. You can display the dialog ...

Discover More

Printing Workbooks in a Folder

This tip presents two techniques you can use to print multiple workbooks all at the same time. Both techniques involve ...

Discover More

Displaying Blanks when Summing to Zero

If you use fields to sum the information in your table columns, you might want to display a blank when the sum is zero. ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (menu)

Unique Military Date Format

Some industries (such as the military) have special formatting that they use to represent dates. Here is one such format ...

Discover More

Calculating Averages by Date

When you have a huge amount of daily data to analyze, you may want to calculate an average of values for any given date ...

Discover More

Calculating the First Business Day of the Month

Want to know which day of the month is the first business day? There are a few ways you can check to make sure the date ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is two less than 9?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.