Advertisement
Guest User

Untitled

a guest
Aug 20th, 2014
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. Function GrabOnly(cell As Range, Optional numbers As Long = 1) As String
  2. Dim final As String
  3. Dim i As Long
  4. For i = 1 To Len(cell)
  5. If numbers = 1 Then
  6. If IsNumeric(Mid(cell, i, 1)) Then
  7. final = final & Mid(cell, i, 1)
  8. End If
  9. Else
  10. If Not IsNumeric(Mid(cell, i, 1)) Then
  11. final = final & Mid(cell, i, 1)
  12. End If
  13. End If
  14. Next
  15. GrabOnly = final
  16. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement