Free Microsoft Excel 2013 Quick Reference

convert decimal to inch & fraction

CAN YOU FORMAT A CELL TO CONVERT DECIMALS TO INCH & FRACTION OF INCH?


CAN YOU FORMAT A CELL TO CONVERT DECIMALS TO INCH & FRACTION OF INCH?

Can you provide a formula to convert a decimal to an inch & fraction?
I am using Excel 2000.
Thank you for your help.

Can you provide a formula to convert a decimal to an inch & fraction?
I am using Excel 2000.
Thank you for your help.

I need to convert mm to inch fraction as read on a ruler to the nearest 1/8th

the below formula works great as long as the mm are positive. How do I change it so that it works whether positive or negative?



I need help to convert Decimal to Fraction
I use this code

	VB:
	
 
    Dim lngTest As Long 
    Dim dblResult As Double 
     
    lngTest = 0 
    Do 
        lngTest = lngTest + 1 
        dblResult = lngTest / dblDecimal 
    Loop Until Int(dblResult) - dblResult = 0 
    LongFraction = lngTest & "/" & Int(dblResult) 
End Function 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
It comes out like 89/8, but i want something like 11 1/8

Can please anyone help me to solve this???

Thank you!!

Can you format a cell to convert decimals to feet & inches
i.e. 10.250 to 10'-3"

I need to convert millimeters to inches.

The trouble is that I want it in fractions that correspond with a ruler.

Hence, I need 1555 mm to be 61 1/4" not 61 2/9"

I need all measurements to round off to the nearest 1/8

I am using the Width property of some cells to determine their width. This is returned in pixels.

Does the width in pixels depend on the resolution of the screen? If so, is there some way to convert the width is pixels to a width in some constant unit (inches, points, centimeters, etc.)?

If the width in pixels isn't dependent on the resolution, where does it come from, and how can I convert it to inches?

Any help would be appreciated.

Hi All,

I'm currently having following code to convert decimals to 2 digits.

but here I got to select the range ( for example Q2 to Q1500), I would like to tweek this code may with help of a looping so that I would convert all the data located in Q column not restricting to specific range .. code is as follows :

Sub sumtest()

Dim myrange As Range
Dim allData As Range
Set allData = Range("Q2:Q1500")

For Each myrange In allData
With myrange
If IsNumeric(myrange) Then myrange.Value = ((100 * Application.WorksheetFunction.Sum(myrange.Cells) + 0.01) 1) / 100
On Error Resume Next
End With
Next myrange
End Sub

Thank you all

can some one please show me how to convert decimal to time. attached is a draft of my projectLeave_Tracker(1).xls

Morning,

We have a program that exports a table from Auto-cad to Excel, using a
program called TableBuilder. It exports using feet, inches and fractions eg
6'-5 1/2" or 4'-0".

I'm looking for a way to convert this to inches and decimal points and all
the -, ', " removed.
for example 6'-5 1/2" will be 77.5 and 4'-0" will be 48

Any ideas? It's a huge spreadsheet and doing each conversion individually
will drive me nuts.

Cheers in advance

Dee

I need help shrinking down my formula to make it fit in one cell.

Right now, the way i have it, it spans across (7) different cells to get the results i desire. Is there a way i can make this shorter?

A11 – This is where the decimal value of a number is inputted.

B11 – This is the final display after running A11 through the formulas below

Here are my formulas:

B11 =IF(H11>=15.5,(H11+F11)/100+C11,(((H11/10000)+(F11/100)+(+C11))))

C11 =ROUNDDOWN(A11,0)

D11 =SUM(A11-C11)

E11 =IF(D11>=0.997395,D11+C11,D11*12)

F11 =ROUNDDOWN(E11,0)

G11 =SUM(E11-F11)

H11 =SUM(16*G11)

What this is doing is sort of hard to explain. Here at work, we run Hewlett Packard calculators to help work with lengths. Well there is a special way we can read Feet-Inch-Fractions on these calculators (using the whole number and 4 decimal places). It does all types of calculations with this number format but it first has to convert it to decimal format, do the math, then back to the Feet-Inch-Fraction format so we can read it again.

What this formula above does is convert the decimal format to the Feet-Inch-Fraction format.

The whole reason why im trying to get this in excel is because im trying to make some work sheets that do the same type thing on a bigger scale. I already have the conversion of the Feet-Inch-Fraction format to decimal format figured out but I cant get excel to convert back the other way without having a huge formula.

Did any of that make sense??

I need a formula that takes a decimal feet value of 18.04461942 and converts it to a fractional feet value of 18' 0 9/16".

Also, there needs to be a way to reduce the fractions down to the smallest value.

Examples: 4/16" should not reduce to 2/8" but rather 1/4".
8/16" should not reduce to 4/16" or 2/4" but rather 1/2"

I will only need values down to 1/16" of an inch. No need to go lower.

Any ideas?

I know that if I enter =3/4 in a cell it will give me .75 but is there is formula to convert fractions into decimals or is this the best way to do it? I was also wondering if there is some way to convert the decimal amount to a fraction

for measurement conversions I know that
=B3*25.4 will convert a decimal to mm and so will the formula =CONVERT(E4,"in","mm")

and to convert mm to a decimal a few formula that work are
=CONVERT(H3,"mm","in")
=MROUND(H4/25.4, 1/8)
=H5/25.4
=INT(H6/25.39999918*8)/8

But is there a way to convert a fraction to the decimal and is there a way to convert mm to a fraction instead of the decimal equivalent of the fraction?
or maybe a formula to convert mm to inches but instead of the result being in decimal format it would be in fraction format?


	VB:
	
 convertDecimal2Fraction() 
     
     ' this VBA macro will convert a decimal value on an MS Excel spreadsheet
     ' to a fraction in the cell immediately to the right of the active cell.
     ' It uses the concept of continued fractions to calculate an approximate
     ' fraction for your decimal. Useful resources about the continued fractions
     ' concept (that i shamelessly used) are available at :
     ' [url]http://www.mcs.surrey.ac.uk/Personal/R.Knott/Fibonacci/cfINTRO.html[/url] and
     ' [url]http://homepage.smc.edu/kennedy_john/CONFRAC.PDF[/url]
     
    Dim x As Double 
    Dim z As Double 
    Dim fraDen As Double 
    Dim fraNum As Double 
    Dim preDen As Double 
    Dim preNum As Double 
    Dim counter 
     
    x = ActiveCell.Value 'make sure the decimal value you want converted is highlighted
    z = x 
    preDen = 0 
    fraDen = 1 
    counter = 0 
     
    Do 
        z = (1 / (z - Int(z))) 
        scratchValue = fraDen 
        fraDen = Int(z) * fraDen + preDen 
        preDen = scratchValue 
        fraNum = Int(x * fraDen + 0.5) 
        counter = counter + 1 
    Loop Until (Abs((x - (fraNum / fraDen))) < 1E-20) Or (z = Int(z)) Or (counter = 594) 
     
    ActiveCell.Offset(0, 1).Value = fraNum & "/" & fraDen 
     
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines


Hey Pete_uk,
No idea why it's not coming up.

My reply was as follows,

That would be amazing! The first cell this needs to applied to is D5 and the
same column D.

Thank you in advance

Dee

"Pete_UK" wrote:

> It will be a complex formula (almost finished), but to avoid problems
> with converting cell references can you tell me which is the first
> cell that this will apply to in your sheet, eg F2, and which column
> you want the formula to go into? Then I can give you the exact formula
> which you will be able to copy/paste into your sheet.
>
> Pete
>
> On Sep 17, 10:06 pm, Dee > wrote:
> > Morning,
> >
> > We have a program that exports a table from Auto-cad to Excel, using a
> > program called TableBuilder. It exports using feet, inches and fractions eg
> > 6'-5 1/2" or 4'-0".
> >
> > I'm looking for a way to convert this to inches and decimal points and all
> > the -, ', " removed.
> > for example 6'-5 1/2" will be 77.5 and 4'-0" will be 48
> >
> > Any ideas? It's a huge spreadsheet and doing each conversion individually
> > will drive me nuts.
> >
> > Cheers in advance
> >
> > Dee
>
>
>

Hi,

Can anyone help me with a code for converting decimal number to a nearest 1/16 th fraction. For example converting number 2.1875 to 2 3/16 and so on...Also if it is 2.5 it should display 2 1/2...

Thanks in advance,

Sathish.

Hi,

I have a column with measurements in millimeters and I want to convert them to proper fractional inches.

i.e. 29mm in one cell needs to be converts to 1 1/4.

As well as the above, I the fraction should be no smaller that 1/8. In other words I don't want 16ths or 32ths. Just 8ths, Quarters & halves. It should round to the nearest fraction.

I did look at some other posts but couldn't find the right solution.

Thanks

HI
Can someone help me to convert decimals to fraction. I mean fixed fraction, only fraction of 8 and 16. So if the decimal is between 0,03125 and 0,09375
then 1/16, but if the decimal is between 0.09376 and 0,15625 then it showes 1/8. and so on. 3/16, 3/8.......
IF you can help me to write the script from the beginning of the script, include the start of the fraction test and the end of the script. I know it much to ask for, but I hope someone will help me

Rune

Is it possible to convert decimals to fractions in Excel?

Without using VBA would be ideal, but if thats the path, then so be it.

Thanks yall!

- Jasen

I've seen the other posts but they deal with smaller numbers or different
formats. I need to convert 188.76 inches to feet and inches.

I am trying to convert numbers up to decimal 17,000,000 from decimal to binary (24 bit). Excel's "dec2bin()" function only goes up to 512 (9 bit). Do you know an easy way to convert much larger numbers to binary without leaving Excel?

Great forum. I am a builder, and would really like to use excel in my work. Can anyone help me in getting decimals to come out to 16ths of an inch. example. .75 + 2.5 = 3.25, i'd like for the cell to show up as 3.4 ie. 4/16's. Excel will make .6 show up as 2/3's, but I need (.6x16) or rounding up 10/16's. Any help would be greatly apprciated. Thanks.

I'm a novice at using macros in excel and I need to convert 3 columns and 255 rows of decimal numbers into hexidecimal numbers. I've done the easy part and created buttons on my excel sheet, one button to convert to hex and the other to convert back to decimal. Can anyone help me with the VBA code to get these buttons working?