Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, and 2016. 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.

Displaying a Number as Years and Months

by Allen Wyatt
(last updated January 6, 2018)

3

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, 2013, and 2016. You can find a version of this tip for the older menu interface of Excel here: Displaying a Number as Years and Months.

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

Guidelines for Laser Printer Letterhead

Plan on using printed letterhead in your laser printer? Here are some tips and cautions about doing so.

Discover More

Adding Many No-Width Optional Breaks

One of the special characters you can add in a document is the no-width optional break. Although originally designed for ...

Discover More

Inserting a Watermark Behind Merged Cells

If you have a group of merged cells into which you want a user to enter information, you may want some sort of ...

Discover More

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!

More ExcelTips (ribbon)

Forcing Dates Forward

Want to push a date to some pre-defined day of the month? Here are some ways to force the issue.

Discover More

Incrementing Months in Dates

Excel can easily store dates. If you want to increment a date by one month, there are a number of ways you can accomplish ...

Discover More

Calculating Business Days

There are calendar days and then there are business days. Excel provides two functions (NETWORKDAYS and NETWORKDAYS.INTL) ...

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}] 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 two more than 9?

2018-03-20 08:32:07

Dave Shepherd

This example should use ROUNDUP function for months section as payback is calculated in full month; INT always rounds down, it basically works the same way as ROUNDDOWN(A1,0). This also would fix the negative issue if you replace all of the INTs with ROUNDDOWN, ROUND or ROUNDUP as appropriate

If you need completed months only
=INT(A1) & " years / " & INT((A1-INT(A1))*12) & " months"

If you need to nearest months
=INT(A1) & " years / " & ROUND((A1-INT(A1))*12,0) & " months"

If you need to count part month as complete month (as in the example given)
=INT(A1) & " years / " & ROUNDUP((A1-INT(A1))*12,0) & " months"


2018-02-18 06:27:37

Willy Vanhaelen

@DREW
You are right, months are not in tenths but the formula doesn't do that. Try with 6.92 and you get 6 years / 11 months. So the formula is all right BUT ONLY FOR POSITIVE NUMBERS. For positive as well as negative numbers use this formula:

=TRUNC(A1) & " years / " & TRUNC((A1-TRUNC(A1))*12) & " months"


2018-02-17 17:09:31

DREW

NO. THIS WRONG! MONTHS ARE NOT IN TENTHS!


This Site

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.

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.