Jump to content

Recommended Posts

Posted

So, I have been asked to turn a column of "age in months" into a a column with year/months format:

 

Eg. 126 becomes 11/6

 

So, I have come up with this rather beautifully ugly formula:

 

=ROUND(B3/12,0)&"/"&ROUND((MID(ROUND(B3/12,2),FIND(".",ROUND(B3/12,2),2),2))*12,0)

 

Can anyone do it more elegantly?

Posted (edited)

If you don't mind the /12 being there you can just format the cell to # ?/12

 

Or do =INT(A11/12)&"/"&(A11-12*INT(A11/12))

Edited by mavhc
Posted
If you don't mind the /12 being there you can just format the cell to # ?/12

 

That just gives me 126 again. Plus, the output has to be in the exact format mentioned (as it is imported into something else in that format, don't ask my why that format though).

Posted (edited)

I learnt about Modulus and Quotients at High School

Albeit a long time (and distance from UK) ago...

 

There isn't a lot (mathematical) that Excel doesn't do...

Edited by kearton
Posted
I learnt about Modulus and Quotients at High School

Albeit a long time (and distance from UK) ago...

 

There isn't a lot (mathematical) that Excel doesn't do...

 

They ring a bell to me now. Just I rarely use Excel. :D

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...