title: Excel Macro to convert date value to plain text, no formatting
body: <p>Similar question (but not the same) as <a href="https://stackoverflow.com/questions/9992893/convert-date-field-into-text-in-excel">this one</a>.</p>
  
  <p>My question is slightly different.  I have a column of dates converted from <code>mm/dd/yyyy</code> to <code>yyyy-mm-dd</code>. Ex:</p>
  
  <blockquote>
    <p>2013-11-04<br>
    2013-11-05<br>
    2013-12-10</p>
  </blockquote>
  
  <p>These cells are formatted with the following type: <code>yyyy-mm-dd</code>.</p>
  
  <p>I'm having an issue conforming to an XML Schema and then exporting to XML. I think the issue is related to the cells formula (seems to work when there is no formula), therefore I'd like to keep the text only and remove the formatting.</p>
  
  <p>There is a <code>Clear &gt; Clear Formats</code> option but that converts the date back to it's original state <code>mm/dd/yyyy</code>.</p>
  
  <p>I also need to do this in a Macro.</p>
  
  <p>Here my pseudo code:</p>
  
  <pre><code>For Each cell In myRange
      Dim s As String
      s = c.Text
      c.ClearFormats
      c.Text = s
  Next
  </code></pre>
  
  <p>I thought this would work but it doesn't... I get an <code>object required</code> error message.</p>