Link to home
Start Free TrialLog in
Avatar of cansevin
cansevin

asked on

Take Space out of Email

I have a column of email addresses that all have a random space in them. One looks like this:

Nayif .Abdullah@whsd.org

How can I get the space out of the email?
Avatar of Allan Nisbet
Allan Nisbet
Flag of United Kingdom of Great Britain and Northern Ireland image

The quickest way is highlight your column of email addresses in excel

then "find and replace"

press space in find then leave replace blank

THen replace all

This will change all spaces to nothing

Hope this helps
Another solution is if your emails are in Column A

Then in column b paste this formulae
=TRIM (A1)

Open in new window


Drag then formula using the bottom corner over all cells in column b and it will TRIM all spaces

Hope that helps
Avatar of cansevin
cansevin

ASKER

Neither worked for some reason.
Avatar of Shums Faruk
Hi Try below:
=SUBSTITUTE(A1," ","")

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It sounds like its hidden characters in the cells,

A quick way to test in future is to change the font of the column which shows spaces and special characters

Then you can target the special characters directly for repair
Try this on the cell you mentioned:

=CODE(MID(A1,6,1))

That will tell us what character code that blank space really is. You can then use Bill's SUBSTITUTE() example above against all cells to replace that character.

I was thinking it could be done in one step by searching the cell for the location of a character value greater than 126, but that may be more complicated than is required here.
Tahnks1
I wonder, how that accepted solution worked for you,

Attached is the sample:
User generated imageRemove-Extra-Spacing-in-Email.xlsx
Shums, copy from the text that was posted originally in this question, and paste that into Excel.  The "space" was not a space but rather a xA0 character...

~bp
Thanks Bill for explanation. I just wanted to understand, nothing against your solution :)