binary to decimal vba code code example
Example 1: how to convert binary to decimal in vba code
how to convert binary to decimal in vba code
Example 2: binary to decimal vba code
Sub bd()
Funcion Bin2Dec(binVal As String) As Long
Dim binary As Double
Dim iLen As Integer
binVal = Range("c4").Value
iLen = Len(binVal) - 1
For binary = 0 To iLen
bin2dec = bin2dec + _
Mid(binVal, iLen - x + 1, 1) * 2 ^ x
Next
End Function
End Sub