unit conversion formula

E

Edward

Hi, everyone

Can anybody help me with a formula for converting between
centimeters and feet/inches?

I want to go
from xxx (cm) to yy'zz" (feet/inches)

I would appreciate it if you can advise on
how I should display the single and double quotation marks
as well.

The formula should be out there somewhere,
but I just can't seem to find it with a search.

Thanks a lot

Edward
 
B

Bob Phillips

Edward,

Look up the CONVERT function in help, it has many such functions. This one
needs a bit of work as there is not a ft/ins convert directly

=INT(CONVERT(A1,"cm","ft"))&"ft
"&TEXT((CONVERT(A1,"cm","ft")-INT(CONVERT(A1,"cm","ft")))*12,"0.00")&"inches
"

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
B

Bob Phillips

JE,

Nice approach, but you need to modify when the answer is greater than .5
feet. For instance, your formula converts 88cm to 3'11" not 2'11". To my eye
it's as simple as
=TEXT(INT(A1/30.48),"0'") & TEXT(MOD(A1,30.48)/2.54,"0") & """"

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
J

J.E. McGimpsey

Hmm... Thanks for the correction!

I orginally had TEXT in my test sheet, then changed it to INT for
that very reason - guess I didn't copy it back.
 
E

Edward

Bob, J.E.

Thanks, guys
That was great

Just what I needed/wanted

----- J.E. McGimpsey wrote: ----

Hmm... Thanks for the correction

I orginally had TEXT in my test sheet, then changed it to INT for
that very reason - guess I didn't copy it back
 

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