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: Leap Years and Fiscal Periods.

Leap Years and Fiscal Periods

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


1

A company's fiscal year can end at any time, not just when a calendar year ends. When putting together a worksheet, you may want to calculate a date that is one year before or after a given date that represents the end of a fiscal period. This can be done quite easily with any number of formulas, such as the following:

=DATE(YEAR(D1)-1, MONTH(D1), DAY(D1))

This formula takes a date (cell D1) and subtracts a year from it. Thus, if D1 contains the date 6/30/10, then the formula returns 6/30/09.

This works great in most instances because most months have the same number of days from one year to the next. There is, of course, one exception—February. If you have a fiscal year that ends in February, the variable number of days in the month can play havoc with the above formula. If cell D1 contains 2/28/13, then the formula returns 2/28/12, when the real end of the fiscal period is 2/29/12. Similarly, if cell D1 contains 2/29/12, then the formula returns 3/1/11, which is obviously not what was intended.

There are a couple of ways you can determine the end of the fiscal period. The first is through the use of the EOMONTH function. This function is used to return the end of a month a given number of months in the past or future. For instance, if you wanted to know the last day of the month twelve months ago, you can use the following formula:

=EOMONTH(D1,-12)

The EOMONTH function is part of the Analysis ToolPak, so you will need to make sure you have it installed and enabled on your system. (How you do this has been covered in other ExcelTips.)

In some instances you might not want to use EOMONTH. For example, you might be distributing the workbook to others, and you are not sure if they have the Analysis ToolPak installed on their system. In such instances you could use the following formula:

=DATE(YEAR(D1)-1, MONTH(D1)+1, 0)

This formula, just like the EOMONTH function, returns the end of the month for exactly one year ago. Another formula to return the end of month one year ago is as follows:

=D1-365-(DAY(D1)<>DAY(D1-365))

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2314) 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: Leap Years and Fiscal Periods.

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

Freezing a Table

Tired of Word changing the dimensions of table cells to accommodate what you place in those cells? You can instruct Word ...

Discover More

Scrolling Up and Down

Need an easy way to move through a spreadsheet using a mouse? Here are a couple of ideas.

Discover More

Jumping to a Line Number

Need to jump to a specific line number in your document? It's easy to do using the Go To command, as described in this tip.

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (menu)

Date for Next Wednesday

When working with dates, it is often helpful to be able to calculate some date in the future based on a starting date. ...

Discover More

Adjusting Date Values by Keypress

Excel allows you to store dates in a cell. Wouldn't it be great if you could select a cell containing a date and then ...

Discover More

Pulling All Fridays

It can be handy to know when specific weekdays occur within a range of dates. Figuring out this information, using ...

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 1 + 1?

2021-03-20 06:54:23

P de la Court

The last two formlas in this exceltip do not always give the same result:
The formula =D1-365-(DAY(D1)<>DAY(D1-365)) gives the same date in the previous year, except when D1 is February 29, in which case it returns February 28.
But if the previous year is a leap year, and the date in D1 was Feb 28, it will return Feb 28 instead of Feb 29 and therefore NOT the end of the month in that leap year.
The slightly modified formula =D1-365-(DAY(D1)>DAY(D1-365)) will return the end of month, exactly the same as =DATE(YEAR(D1)-1, MONTH(D1)+1, 0).


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.