Numbers & STRINGS,SPECIAL CHARACTERS

     

    This program allows the user to extract:

  • Strings
  • Numerics
  • Special Characters
  • Private Sub CommandButton1_Click()
    r = 1: i = 1
    Dim str As String
    Dim Data As String
    Do Until Cells(r, 1) = ""
    Data = Cells(r, 1).Value
    For i = 1 To Len(Data)
    If Mid(Data, i, 1) Like "[0-9]" Then
    numb = numb + Mid(Data, i, 1)
    Cells(r, 2).Value = numb
    ElseIf UCase(Mid(Data, i, 1)) Like "[A-Z]" Then
    str = str + Mid(Data, i, 1)
    Cells(r, 3).Value = str
    ElseIf Not Mid(Data, i, 1) Like "[0-9]" Or UCase(Mid(Data, i, 1)) Like "[A-Z]" Then
    spechar = spechar + Mid(Data, i, 1)
    Cells(r, 4).Value = spechar
    End If
    Next
    r = r + 1
    numb = ""
    str = ""
    spechar = ""
    Loop
    End Sub

    Download The Workbook