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.
The code below is what I have now, but it won’t solve the error.
Range("A1:A" & LastRow).Select
Selection.NumberFormat = "0"
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.
Range("I1:I" & LastRow).Select
Selection.NumberFormat = "0.00"

Thanks for your help! 🙂
Extra shoutout to Siddharth who helped me complete this complete issue.
Tom,
There are 3 ways to solve this
1) Go Back to your quote generator and see how it is saving the data to Excel Sheet and amend the code there
2) Manually: Highlight the Range and click on the exclamation mark next to the Green Triangle and click on “Convert to Number” See snapshot
3) Use this code.
FOLLOW UP
Before and After snapshot attached
MORE FOLLOW UP (IMPORTANT)
If you have different regional settings then you will have to take care of them appropriately.
For Example Dutch Belgium you have to use “,” for a decimal. Please see snapshot.