Convert months to years/months

R

ruth7

Hi,

any help would be appreciated ... I need to convert a numeric number
of months to years and months. The example is:

Contibutory service age (months) 1072
Want to convert 1072 months to read "89 years 4 months"

Can this be done?
Thanks
Ruth
 
D

Dave Peterson

You could use a helper column and a formula like:

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

Thomas Hardy

Hi Ruth,

Enter 1072 in cell A1 and this formula in any other cell:

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

The result will be displayed as "89 years 4 months"

This displays 13 months as "1 years and 1 months" which is ugly, you can fix
that with some if statements.

It also displays 12 months as 1 years and 0 months and displays 5 months as
0 years and 6 months which are also ugly.

Regards

Thomas.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top