Display measurement in feet and inches

User avatar
StuartR
Administrator
Posts: 12633
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Display measurement in feet and inches

Post by StuartR »

I have a cell containing a measurement in meters, and I need to display this in feet and inches. I came up with this formula, which seems awfully convoluted to me. Is there an easier way to do this? (Height in meters is in $K$2)

=((100*$K$2/2.54)-MOD((100*$K$2/2.54),12))/12&" ft "&ROUND(MOD((100*$K$2/2.54),12),1)&" in"
StuartR


User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Display measurement in feet and inches

Post by Rudi »

Not much of a lenth improvement, but the CONVERT() function makes it easier to read...

=INT(CONVERT($K$2,"m","in")/12)&" ft "&ROUND(MOD(CONVERT($K$2,"m","in"),12),1)&" in"
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
HansV
Administrator
Posts: 78674
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Display measurement in feet and inches

Post by HansV »

A variation on Rudi's formula, converting to feet for the first part:

=INT(CONVERT($K$2,"m","ft"))&" ft "&ROUND(MOD(CONVERT($K$2,"m","in"),12),1)&" in"
Best wishes,
Hans

User avatar
Rudi
gamma jay
Posts: 25455
Joined: 17 Mar 2010, 17:33
Location: Cape Town

Re: Display measurement in feet and inches

Post by Rudi »

:blush: What a dumbo oversight was that?!
TX.
Regards,
Rudi

If your absence does not affect them, your presence didn't matter.

User avatar
HansV
Administrator
Posts: 78674
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Display measurement in feet and inches

Post by HansV »

Not dumbo at all - your formula works fine too!
Best wishes,
Hans

User avatar
StuartR
Administrator
Posts: 12633
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Display measurement in feet and inches

Post by StuartR »

Now I've learned about Convert, I never knew that existed. Thank you both.
StuartR