提取字符串中的数字
'提取字符串中的数字 Function GetDigits(strText As String ) As String Dim strChar As String , strMsg As String Dim i As Long strMsg = "" For i = 1 To Len(strText) strChar = Mid(strText, i, 1) If strChar Like "#" Then strMsg = strMsg & strChar Next GetDigits = strMsg End Function
效果:
标签:Function,String,自定义,strChar,strMsg,strText,有用,抄录 From: https://www.cnblogs.com/officeplayer/p/17817505.html