title: Faster way to remove 'extra' spaces (more than 1) from a large range of cells using VBA for Excel
body: <p>How do I remove extra spaces faster, from a large range of cells containing text strings?</p>
  
  <p>Let's say 5000+ cells.</p>
  
  <p>Some ways I have tried include:</p>
  
  <pre><code>For Each c In range
      c.Value = Trim(c.Value)
  Next c
  </code></pre>
  
  <p>and</p>
  
  <pre><code>For Each c In range
      c = WorksheetFunction.Trim(c)
  Next c
  </code></pre>
  
  <p>and</p>
  
  <pre><code>For Each c In range
      c.Value = Replace(c.Value, "     ", " ")
  Next c
  </code></pre>
  
  <p>Any ideas for speed improvement?</p>