Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function GrabOnly(cell As Range, Optional numbers As Long = 1) As String
- Dim final As String
- Dim i As Long
- For i = 1 To Len(cell)
- If numbers = 1 Then
- If IsNumeric(Mid(cell, i, 1)) Then
- final = final & Mid(cell, i, 1)
- End If
- Else
- If Not IsNumeric(Mid(cell, i, 1)) Then
- final = final & Mid(cell, i, 1)
- End If
- End If
- Next
- GrabOnly = final
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement