Module Code: 'Output is string 'String output = "WholeNumber Numerator/Denominator" Function SimFraction (WholeNumber As Integer, Numerator As Integer, Denominator As Integer) as string Dim Num As Double Dim Den As Double Dim Whole As Double Num = Numerator Den = Denominator Whole = WholeNumber ReDim NumRng(1 To (Num + Den)) ReDim DenRng(1 To (Num + Den)) For I = 1 To Num Q = Num / I IQ = Int(Q) If Q = IQ Then NumRng(I) = True Next For I = 1 To Den Q = Den / I IQ = Int(Q) If Q = IQ Then DenRng(I) = True Next For I = 1 To Den If NumRng(I) = True Then If NumRng(I) = DenRng(I) Then If I > A Then A = I End If End If End If Next NumAns = Num / A DenAns = Den / A If NumAns > DenAns Then W = NumAns / DenAns IW = Int(W) If IW > W Then IW = IW - 1 Frt = NumAns - (IW * DenAns) If Frt <> 0 Then simFraction = (IW + Whole) & " " & Frt & "/" & DenAns ElseIf Frt = 0 Then simFraction = IW + Whole End If Else If NumAns = DenAns Then Solution = NumAns + Whole Else If Whole = 0 Then SimFraction = NumAns & "/" & DenAns Else simFraction = Whole & " " & NumAns & "/" & DenAns End If End If End If End Function