Just a shot snippet of code to pull out e-mail addresses only, it works as a function in excel so you can write it as a function in excel.
1 2 3 4 5 6 7 8 9 10 11 12 |
Function AlphaNumericOnly(strSource As String) As String Dim i As Integer Dim strResult As String For i = 1 To Len(strSource) Select Case Asc(Mid(strSource, i, 1)) Case 48 To 57, 65 To 90, 97 To 122, 64, 46: 'include 32 if you want to include space strResult = strResult & Mid(strSource, i, 1) End Select Next AlphaNumericOnly = strResult End Function |
Tags: data cleaning, email, excel, vb