Weiss jemand eine Loesung, wenn noetig ueber eine mathematischen Funktion?
Beispiel:
Zelle A1: 1000111101001001110001
Zelle A2: =BIN2DEC(A1)
Ergibt z.Zt. #NUM Fehler (#Zahl in Deutsch).
Danke,
Rascal
Function MyBin2Dec(x As String) As Long
Dim rest As String
Dim temp As Long
Dim i As Integer
rest = x
temp = 0
For i = 0 To Len(x) - 1
temp = temp + 2 ^ i * Right(rest, 1)
rest = Left(rest, Len(rest) - 1)
Next i
MyBin2Dec = temp
End Function