以下是引用rongjun在2004-11-28 21:09:00的发言:apolloh兄,你的结果不对啊!另外公式我已经有了,现在我想用VBA做一个!请兄弟再帮忙!
对不起刚才看错题了
Function ISBN10TO13(Str10 As String) As String
Dim a As Byte
Dim b As Byte
Dim i As Byte
Dim T As String
If InStr(1, Str10, "/") <> 0 Then Str10 = Left(Str10, InStr(1, Str10, "/") - 1)
Str10 = "978" & Left(Replace(Str10, "-", ""), 9)
For i = 0 To 5
a = a + Mid(Str10, (i + 1) * 2, 1)
b = b + Mid(Str10, i * 2 + 1, 1)
Next i
T = 10-(a * 3 + b) Mod 10
If T = "10" Then T = "X"
ISBN10TO13 = Str10 & T
End Function
tR1egKBT.rar
(7.84 KB, 下载次数: 21)
忘了用10减了,改一下
[此贴子已经被作者于2004-11-28 22:00:07编辑过] |