×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# An Excel conversion question3

## An Excel conversion question

(OP)
Does anybody know if it is possible to covert meters to feet-fractional inches in excel?
I could not find anything on this.

Thanks

### RE: An Excel conversion question

Jerry…

Over the past few months, I have posted a bunch of things to the PTC Mathcad boards, including a feet-inches-fractions calculator. Included in that particular post is an Excel spreadsheet to do F-I-F calculations. My spreadsheet does NOT include metric to F-I-F, but I think you should be able to use my spreadsheet as a way to shorten your task. You can find it here: http://communities.ptc.com/docs/DOC-5190

Fred

==========
"Is it the only lesson of history that mankind is unteachable?"
--Winston S. Churchill

### RE: An Excel conversion question

The closest I can get using built in functions, without getting excessively complicated, is to use the Convert function, split the result into two cells, and format the inches cells as fractions. For a value in A1:
Feet, in B1: =INT(CONVERT($A1,"m","ft")) Inches, in C1, format as fraction: =((CONVERT($A1,"m","ft")-B1)*12)

The problems with this are that you probably won't like the numbers they choose for the fraction, and the value is now split over two cells, so you can't use it as a value in further calculations.

A UDF should be pretty easy, I'll have a look.

Also for a general purpose unit converter, have a look at: http://newtonexcelbach.wordpress.com/2012/08/28/un...

Doug Jenkins
Interactive Design Services
http://newtonexcelbach.wordpress.com/

### RE: An Excel conversion question

2
Code for a UDF to convert metres to feet and fractional inches is listed below.
=m2ftin(10) returns 34' 5.39"
=m2ftin(10, 16) returns 34' 5 6/16"

#### CODE --> VBA

Function M2Ftin(Mval As Double, Optional Denom As Long = 0, Optional InDP As Long = 2) As String
Dim ft As Double, inch1 As Double, inch2 As Double, Frac As Long, m2in As Double, Rtn As String
'Converts MVal to ft and inches, returning a string
'If Denom is > 0 then inches are returned as a fraction with the specified denominator
' If Denom is zero or blank inches are returned as a decimal with InDP decimal places, default 2
m2in = 1000 / 25.4
inch1 = Mval * m2in
ft = Int(inch1 / 12)
inch2 = inch1 - ft * 12
ft = Int(inch1 / 12)
If Denom > 0 Then
Frac = Round((inch2 - Int(inch2)) * Denom, 0)
inch2 = Int(inch2)
Else
inch2 = Round(inch2, InDP)
End If
Rtn = ft & "' " & inch2
If Denom > 0 Then
If Frac > 0 Then
Rtn = Rtn & " " & Frac & "/" & Denom & """"
Else
Rtn = Rtn & """"
End If
Else
Rtn = Rtn & """"
End If
M2Ftin = Rtn
End Function 

Doug Jenkins
Interactive Design Services
http://newtonexcelbach.wordpress.com/

### RE: An Excel conversion question

The results given above are actually for 10.5 m, not 10.0 m

Also the second "ft = Int(inch1 / 12)" in the code is redundant.

Doug Jenkins
Interactive Design Services
http://newtonexcelbach.wordpress.com/

### RE: An Excel conversion question

Here's another on-sheet method, from:
http://excel-formulas.blogspot.com.au/2009/07/disp...

If you have the dimension in feet in A2 then:
=INT(A2)&"' "&TEXT(12*(A2-INT(A2)),"# #/#")&CHAR(34)
will give feet and inches with fractions.

If you want to convert from m to feet and inches all in the one cell it would be (with metres in A1) :
=INT(CONVERT(A1,"m","ft"))&"' "&TEXT(12*(CONVERT(A1,"m","ft")-INT(CONVERT(A1,"m","ft"))),"# #/#")&CHAR(34)

If you have decimal inches as a value in a cell you can format it to display as eighths, sixteenths, etc, but I don't know how to do that in a text formula.

Doug Jenkins
Interactive Design Services
http://newtonexcelbach.wordpress.com/

### RE: An Excel conversion question

(OP)
just got back to this thread after being gone for several days
Thank you very much for all the replies, incredibly helpful

### RE: An Excel conversion question

Displaying the text formula with a specified denominator turns out to be pretty easy:
=INT(A2)&"' "&TEXT(12*(A2-INT(A2)),"# #/16")&CHAR(34)
see:
http://newtonexcelbach.wordpress.com/2014/05/28/py...

Doug Jenkins
Interactive Design Services
http://newtonexcelbach.wordpress.com/

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

#### Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a partâ€™s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!