Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, and 2013. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Displaying a Number as Years and Months.
by Allen Wyatt
(last updated April 13, 2016)
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 (12485) applies to Microsoft Excel 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Excel here: Displaying a Number as Years and Months.
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!
Want to know which day of the month is the first business day? The easiest way to determine the date is to use the WORKDAY ...Discover More
You can use a couple of different worksheet functions to enter today's date in a cell. What if you want to calculate ...Discover More
When showing how much time has elapsed between two dates, it is sometimes helpful to express the result in terms of elapsed ...Discover More
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.