可以先用code函数转换成单个数字,再连接起来。
那只能用自定义函数了
Function ABC(a As Range)
Dim i%, j%, arr(), ss$
ss = a.Value
j = Len(ss)
ReDim arr(1 To j)
For i = 1 To j
If Asc(Mid(ss, i, 1)) >= 65 And Asc(Mid(ss, i, 1)) <= 90 Then
arr(i) = Asc(Mid(ss, i, 1)) - 64
Else
arr(i) = Mid(ss, i, 1)
End If
Next
ABC = Join(arr, "")
End Function