title: Excel VBA - Value of a field to Number
body: <p>My quote generator creates an Excel document and I want to run a macro on it to just keep it's calculations. For some reason it says 'Number stored as text' when there are numbers. How can I change them to the number format using the macro? I have found out if I click once in the formula bar, the problem is solved too. </p>
  
  <p>The code below is what I have now, but it won't solve the error.</p>
  
  <pre><code>Range("A1:A" &amp; LastRow).Select
  Selection.NumberFormat = "0"
  </code></pre>
  
  <p>Column A contains an amount (1, 2, 3, etc). I have another column with the same problem, but this contains a currency in € and has 2 decimal places. </p>
  
  <pre><code>Range("I1:I" &amp; LastRow).Select
  Selection.NumberFormat = "0.00"
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/X6NkS.png" alt="enter image description here"></p>
  
  <p>Thanks for your help! :) </p>
  
  <p><strong>Extra shoutout to Siddharth who helped me complete this complete issue.</strong></p>