Jschwak,
As you have thousands of email addresses you may be interested in the following simple macro.
The macro will Clean and Trim your data (see the Notes at the end).
Put the macro into a standard module:
- Right click a worksheet tab
- Select View - this will take you to the VBA editor (VBE)
- In the VBE, go to the Insert menu and click “Module”
- In the white space that opens up, copy/paste the macro
- Alt-Q (hold down the Alt key and press Q) – this will close the VBE and take you back to your worksheet.
To run the macro, either:
1. Go to the Tools menu, select Macro, then Macros. Highlight the macro’s name (“trimIt”), then hit the Run key.
2. Assign the macro to a button from the Forms menu (post back if you require help with this).
The macro assumes that your email addresses are all in column A.
Code:
Sub trimIt()
Dim x As Long
x = Range("A63556").End(xlUp).Row
For i = 1 To x
Cells(i, 1) = Application.Clean(Application.Trim(Cells(i, 1)))
Next
End Sub
Notes:
The CLEAN function removes all nonprintable characters from text.
The TRIM function removes all spaces (including leading and trailing spaces) from text except for single spaces between words.
HTH
Mike