Saram Hassan
Saram Hassan

Reputation: 3

Excel Formula to convert from cm to inches and feet & round off to two digits

I wanted to convert a value from centimeters to Inches and Feet. in the following format (0' 00'') and I am using the following forumla for this

=INT(CONVERT(A1,"cm","ft")) & " '" &  12*(CONVERT(A1,"cm","ft")-INT(CONVERT(A1,"cm","ft"))) & """"

The answer is accurate but the only Problem is The value of Inches has a lot of digits after decimal points..

Please help me how can I round off the Inches part of the value to two digits after decimal point?

Please help me how can I improvise this formula Thanks

Saram.

See Example in the Image

Upvotes: 0

Views: 1402

Answers (1)

Ron Rosenfeld
Ron Rosenfeld

Reputation: 60334

Just need to use the TEXT function to format, and insert a space after the '

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

Upvotes: 0

Related Questions