Need to extract numbers from the following text with spaces between numbers using VBA, possibly.
Units : 1.00, Code: '99213', M1: '25',Comments: 'Records do not include documentation of an evaluation and management service that is separately identifiable from the service also performed on 01/12/2018. Therefore the modifier 25 for 99213 is not supported.'
Current VBA extracts the numbers but puts in this format:
10099213125011220182599213 which is including dates - don't need.
Would like to see:
100 99213 25.
Here is my current code:
Function OnlyNums(strWord As String) As String
Dim strChar As String
Dim x As Integer
Dim strTemp As String
strTemp = ""
Application.ScreenUpdating = False
For x = 1 To Len(strWord)
strChar = Mid(strWord, x, 1)
If Asc(strChar) >= 48 And _
Asc(strChar) <= 57 Then
strTemp = strTemp & strChar
End If
Next
Application.ScreenUpdating = True
OnlyNums = "'" & strTemp & "'"
End Function
