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.
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.
Learn more about Allen...
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: Calculating a Group Retirement Date.
In Mani's country government employees retire on the last day of March following the day they turn 55 years old. (If they turn 55 on March 31, they retire that same day.) Given the employee's date of birth, Mani can figure out when they turn 55, but he can't figure out how to calculate the following March 31.
There are many ways you can go about calculating the March 31 after a person turns 55. The one thing that all the formulas have in common, however, is that they must somehow figure out if a person's birthday is before April 1 or not. (They could also figure out whether the birthday is before or on March 31, but the calculation is actually easier if you compare to April 1.)
Assuming the individual's birth date is in cell A1, here is one formula you could use:
This compares the date the person turns 55 with the date of April 1 in the year he or she turns 55. If the date is before April 1, then March 31 of the year he or she turns 55 is used. If the date is later, then March 31 of the following year is used.
This could easily be shortened a bit by simply comparing the birth date to April 1 of that year, in the following manner:
Of course, you could shorten it even more by simply looking at the month in which the birthday occurs:
Another logical step in trying to shorten the formula even further is to do the comparison on the month within the DATE function itself, in this manner:
You can shorten the formula even further by getting rid of the IF statement completely:
This formula works because the comparison (MONTH(A1)>3) returns either 0 or 1 depending on whether it is false or true.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (9775) 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: Calculating a Group Retirement Date.
Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!