excel自定义函数 去除数字、去除*、去除#

Function RemoveNums(theString As String)    

Dim eachChar, Temp As String    

Dim i As Integer    

Temp = ""    

For i = 1 To Len(theString)        

eachChar = Mid(theString, i, 1)        

If (Asc(eachChar) < 48 Or Asc(eachChar) > 57) And (Asc(eachChar) <> 35 And Asc(eachChar) <> 42) Then            

Temp = Temp & eachChar        

End If    

Next    

RemoveNums = Temp

End Function

 

 

posted on 2013-01-21 17:21  不死小强  阅读(549)  评论(0编辑  收藏  举报

导航