Free or not, I think it is pretty good, but then again, I wrote it. :)
I've put a lot of thought into what the correct result should be when converting non-fractional measuraments like "0.9999999/256" and I think returning an ugly but correct answer is preferable to giving a neat-looking, but...
The result for =i2s(1.25) is 1 1/4".
The example above used an input of 12.20 as opposed to 12.25. I think the correct output for 1.20 is 1' - .20" as shown.
In practice, non-fractional decimals (like 0.20) should not come up in measurements since most people use multipules of 1.32nds or 1/64ths.
tutrleshead,
I'm not sure what you mean by "not getting fractions of an inch". Can you give some examples of =i2s() output and what you would want the output to look like?
-josh
I just published an updated version of InchCalc that now includes a second optional parameter to the i2s(( function that will supress the conversion to feet.
For example...
=i2s( 144.0625 , 3 , 1 )
...will display...
144 1/16"
You can download the new version from...
With InchCalc, the following formula...
=i2s( 6.375 )
...will show 6' - 3/8" in the cell. You can also use the optional formating parameter to chaneg the output. Forf example...
=i2s( 6.375 , 1 )
...will show 6' 3/8" (no dash). There are many other formats available.
You can download the...
In your example, lets say you have this spreadsheet...
A B C
1 1.25 2.50 3.75
...where C1 is actually the formula "=A1+B1".
You could then paste the following formula in cell D1...
=INT(C1)&"'-"&TRIM(TEXT(ROUND(MOD(C1,1)*12*16,0)/16,"# ??/??")&"""")
...and you would...
RE #1 - InchCalc chokes on i2s(144.1):
This is an inherent problem in Excel. Try typing the following formula into Excel (any Excel spreadsheet, InchCalc *NOT* required);
=1*(.5-.4-.1)
You might be very surprised to see that the answer is NOT zero.
I could make InchCalc hide this problem...