Months to years conversion help please

jedibrown

Board Regular
Joined
Oct 17, 2011
Messages
136
Good morning everyone,

I have been trying to figure out a formula to convert the amount of months in a certain cell to years.

I have come up with:

=INT(E29/12)&" years "&MOD(E29,12) & " months"

The problem is it comes up with 2 years 3.37063951499227 months

Does anyone know how I change it to come up with 2.4 months, round it to the highest number instead of loads of decimal places? I have tried change cell E29 do 0 decimal places but it doesn't work.

Many thanks :)
 

Some videos you may like

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Try

=INT(E29/12)&" years "&TEXT(ROUNDUP(MOD(E29,12),1),"0.0") & " months"
 

jedibrown

Board Regular
Joined
Oct 17, 2011
Messages
136
Hi VoG,

Thank you for your help.

That returns 2 years 3.4 months so doesn't round up to 2.4 but - that's good enough for what I need. Thank you very much!
 

Watch MrExcel Video

Forum statistics

Threads
1,127,554
Messages
5,625,474
Members
416,109
Latest member
TripleA00123

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top