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: End-of-Month Calculations.

# End-of-Month Calculations

by Allen Wyatt
(last updated October 9, 2017)

There are many ways you can use Excel to calculate the date at the end of the next month. One such way, using the EOMONTH function, as described in other ExcelTips. There are ways you can do it, however, without using that add-in function.

For instance, one approach is to AutoFill for the last days. (Sounds almost religious, doesn't it?) Let's say you wanted the last days of a series of months in the first column, beginning at A4. All you need to do is this:

1. In cell A4, enter the last day of the current month, such as 31 Oct 2012.
2. In cell A5, enter the last day of next month, such as 30 Nov 2012.
3. Select both cells, A4 and A5.
4. Click on the small square handle at the bottom right corner of the selection.
5. Drag the mouse downward as many cells as desired.

The result is that the area you drag over in step 5 is filled with end-of-month dates for the next however many months. Pretty cool! A slight variation on these steps could also be used:

1. In cell A4, enter the last day of the current month, such as 31 Oct 2012.
2. Select cell A4.
3. Right-click on the small square handle at the bottom right corner of the selection.
4. Drag the mouse downward as many cells as desired. When you release the mouse button, Excel displays a Context menu.
5. From the Context menu, choose Fill Months.

If you are not an AutoFill type of person, and instead prefer to use formulas, you could enter the starting end-of-month date in cell A4, and then the following formula in A5:

```=DATE(YEAR(A4),MONTH(A4)+2,1)-1
```

This formula calculates the date for the first day of the month two months in the future, and then subtracts one from it. The result is the last day of the next month. The formula wraps around the end of years just fine, since the DATE function increments the years properly if the month value provided is greater than 12.

Another formulaic approach is to use the following:

```=A4+32-DAY(A4+32)
```

This formula works because it adds 32 to the starting date (to make sure you are past the end of the following month), and then subtracts the number of days the result is past the end of the month.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2181) 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: End-of-Month Calculations.

##### 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

Setting a Default Table Border Width

When you insert a table into your document, it uses a standard-weight line around each cell in the table. If you want to ...

Discover More

Tracing Precedent Cells

Cells that affect another cell are called precedent cells. If you need to know which cells affect a particular cell, ...

Discover More

Simulating Alt+Enter in a Formula

You can use the Alt+Enter keyboard shortcut while entering information in order to force your data onto multiple lines in ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

Specifying Different Weekends with NETWORKDAYS

The NETWORKDAYS worksheet function can be used to easily determine the number of work days (Monday through Friday) within ...

Discover More

Elapsed Days as Years, Months and Days

Need to know how many days there are between two dates? It's easy to figure out—unless you need the figure in ...

Discover More

Weekdays in a Month

Want to find out how many of a particular weekday occur within a given month? Here's how you can find the desired ...

Discover More
##### Subscribe

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

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}] 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 five more than 3?

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.