title: Debugging whitespace in VBA
body: <p>I have a cell in a table that reads:</p>
  
  <p><code>64123</code> where there is some sort of white space after 3.  I thought it was a blank space, so in my vba code, I've tried multiple ways of getting this blank space OUT of the string, but neither <code>application.trim</code> nor <code>replace</code> work.</p>
  
  <pre><code>With Cells(c.Row, 16)
    .NumberFormat = "General"
    v = Application.Trim(.Text)
    v = Replace(v, " ", "")
    Debug.Print v
    .Clear
    .NumberFormat = "General"
    .Value = Application.Trim(v)
  End With
  </code></pre>
  
  <p>There is definitely a blank space at the end - I can see it when I highlight the cell in Excel, and <code>Application.Trim</code> has ALWAYS worked for me.  What else could this be other than a blank space?  If it's a tab or a carriage return, what's the <code>replace</code> syntax for those?</p>