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: Displaying a Number as Years and Months.
by Allen Wyatt
(last updated November 17, 2018)
Robert has a formula that determines the payback period for certain investments. For instance, with $20,000 investment in energy-savings equipment and an annual energy savings of $3000, the simplistic payback period to recoup the investment is 6.6667 years. Robert wonders how he can make this payback period (6.6667) show as years and months instead of as a decimal number.
This can be done by simply multiplying the portion of the answer at the right of the decimal point by 12, which results in a number of months. Here is one way to get the desired result, assuming that the payback result is in cell A1:
=INT(A1) & " years / " & INT((A1-INT(A1))*12) & " months"
With the value 6.6667 in cell A1, the formula would return "6 years / 8 months".
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (6960) 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: Displaying a Number as Years and Months.
Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!
Calculating an age is a common task when working with dates. If you want to figure out the number of years and months ...Discover More
Excel allows you to perform all sorts of calculations using dates. A good example of this is using a formula to figure ...Discover More
Start putting dates in a worksheet (especially birthdates), and sooner or later you will need to calculate an age based ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
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.