Module Code: 'Output is a string data type Function bin (Number As Double) As String Dim Num As Double Dim INm As Double Dim DNm As Double Dim Mtl As Double Dim Ttl As Double Dim SNm As String Dim Blk As Integer Num = Number Mtl = 1 Ttl = 0 SNm = LTrim(Str(Num)) Blk = SNm Like "*.**" If Blk = True Then INm = (((Num * 2) + 1) / 2) End If If Num < 1 And Num > 0 Then bin = "" & Num Exit Function End If If Num < 0 Then Num = 65536 + Num ElseIf Num > 65536 Then Num = Num - 65536 End If Do Num = Num / 2 Mtl = Mtl * 10 SNm = LTrim(Str(Num)) Blk = SNm Like "*.*5*" If Blk = True Then If Ttl < 1 Then INm = (((Num * 2) - 1) / 2) Else INm = CLng(Num) If INm > Num Then INm = INm - 1 End If DNm = Num - INm Num = (DNm / 5) + INm Ttl = Ttl + 1 End If If Num > -2 And Num < 2 Then Exit Do Loop bin = "" & (Num * Mtl) End Function