Alt+F11,插入-模块,粘贴程序 Function BtoD(M) l = Len(M) x = 0 For i = l - 1 To 0 Step -1 x = x + Mid(M, l - i, 1) * 2 ^ i Next BtoD = x End Function 退出 B1公式=BtoD(A1)
Alt+F11,插入-模块,粘贴程序 Function BtoD(M) l = Len(M) x = 0 For i = l - 1 To 0 Step -1 x = x + Mid(M, l - i, 1) * 2 ^ i Next BtoD = x End Function 退出 B1公式=BtoD(A1)