title: Removing All Spaces in String
body: <p>I created a macro for removing all whitespace in a string, specifically an email address. However it only removes about 95% of the whitespace, and leaves a few.</p>
  
  <p>My code:</p>
  
  <pre><code>Sub NoSpaces()
      Dim w As Range
  
      For Each w In Selection.Cells
          w = Replace(w, " ", "")
      Next
  End Sub
  </code></pre>
  
  <p>Things I have tried to solve the issue include:</p>
  
  <p>~ Confirmed the spaces are indeed spaces with the Code function, it is character 32 (space)<br>
  ~ Used a substitute macro in conjuction with the replace macro<br>
  ~ Have additional macro utilizing Trim function to remove leading and trailing whitespace<br>
  ~ Made a separate macro to test for non-breaking spaces (character 160)<br>
  ~ Used the Find and Replace feature to search and replace spaces with nothing. Confirmed working.</p>
  
  <p>I only have one cell selected when I run the macro. It selects and goes through all the cells because of the Selection.Cells part of the code.</p>
  
  <p>A few examples:</p>
  
  <pre><code>1 STAR MOVING @ ATT.NET
  322 TRUCKING@GMAIL.COM
  ALEZZZZ@AOL. COM. 
  </code></pre>
  
  <p>These just contain regular whitespace, but are skipped over.</p>