提取一个单元格中的数字的方法

提取一个单元格中的数字的方法

Function SHUZI(AA As Range)
Dim n As Integer, i As Integer, tem
n = Len(AA.Value)
For i = 1 To n
If IsNumeric(Application.Find(Mid(AA.Value, i, 1), "0123456789")) Then
tem = tem & Mid(AA.Value, i, 1)
End If
Next
SHUZI = Val(tem)
End Function