Sub Macro1()
'新建一个宏将本代码复制即可
' Macro1 Macro
Dim mynum(0 To 9) As Integer
Dim tempstring As String
For i = 1 To 10 '计算10行
tempstring = CStr(Cells(i, 1))
For j = 0 To 9
mynum(j) = 0
Next
j = Len(tempstring)
While j <> 0
If Left(tempstring, 1) >= Chr(48) And Left(tempstring, 1) <= Chr(57) Then
mynum(Left(tempstring, 1)) = 1
End If
tempstring = Right(tempstring, Len(tempstring) - 1)
j = j - 1
Wend
tempstring = Chr(39)
For j = 0 To 9
If mynum(j) = 0 Then
tempstring = tempstring & j
End If
Next
Cells(i, 2) = tempstring
Next
End Sub
。
。