[table="width: 500"]
[tr]
[td]Function FeetInches(ByVal DecimalFeet As Variant, Optional ByVal LargestDenominator As Long = 64) As String
Dim GCD As Long
Dim TopNumber As Long
Dim Remainder As Long
Dim Feet As Long
Dim Numerator As Long
Dim Denominator As Long
Dim Inches As Double
DecimalFeet = CDbl(DecimalFeet)
Feet = Int(DecimalFeet)
Inches = 12 * (DecimalFeet - Feet)
Denominator = LargestDenominator
Numerator = Format(Denominator * Abs(Inches - Int(Inches)), "0")
If Numerator Then
GCD = LargestDenominator
TopNumber = Numerator
Do
Remainder = (GCD Mod TopNumber)
GCD = TopNumber
TopNumber = Remainder
Loop Until Remainder = 0
Numerator = Numerator \ GCD
Denominator = Denominator \ GCD
FeetInches = CStr(Feet) & "' " & Int(Inches) & "-" & CStr(Numerator) & "/" & CStr(Denominator) & """"
End If
End Function[/td]
[/tr]
[/table]