dik
Structural
- Apr 13, 2001
- 25,961
Does anyone have a formula to convert inches to feet-inches, eg. 96 is converted to 8'-0"? If you do, can you cut and paste it?
thanks, Dik
thanks, Dik
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public Function Imp_Frac(ByVal Dec_Arg) As String
Dim Num As Long, sixteenths As Integer
Num = Fix(Dec_Arg)
sixteenths = Abs(Fix((Dec_Arg - Num) * 16))
Select Case sixteenths
Case 1, 3, 5, 7, 9, 11, 13, 15
Imp_Frac = Num & " " & sixteenths & "/16"
Case 2, 6, 10, 14
Imp_Frac = Num & " " & sixteenths / 2 & "/8"
Case 4, 12
Imp_Frac = Num & " " & sixteenths / 4 & "/4"
Case 8
Imp_Frac = Num & " 1/2"
Case Else
Imp_Frac = Num
End Select
End Function
=INT(A1/12)&"'-"&INT(MOD(A1,12))&IF(A1-INT(A1)=0,""""," "&TEXT(FLOOR(A1-INT(A1),1/16),"?/??")&"""")
=IF(SIGN(A1)=-1,"- ","")&INT(ABS(A1)/12)&"'-"&INT(MOD(ABS(A1),12))&IF(FLOOR(ABS(A1)-INT(ABS(A1)),1/16)=0,""""," "&TEXT(FLOOR(ABS(A1)-INT(ABS(A1)),1/16),"?/??")&"""")