In Excel 2002 I used the VBA code that selected a range and multiplied that range by a value of 1.
When changed to Excel 2010, this code does not work anymore.
The code is:
If I do it manually, it works in Excel 2010 but the above VBA code cannot do it.
I also used this:
But it doesn't work either.
The worksheet where I try to apply this is a database report where certain numbers are in text format and therefore I need to convert them to numbers before using the in my models.
I also noticed that the probelm occurs when the initial value has either a comma (,) or point (.) in it. For example, a text 21,1 cannot be converted but the text 21 can.
Also dates, like 31.12.2012 have the same problem.
Can this be fixed somehow?
When changed to Excel 2010, this code does not work anymore.
The code is:
Code:
Range("A1").FormulaR1C1 = "1"
Range("A1").Copy
Range(Cells(2, 1), Cells(100, 1)).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlMultiply, SkipBlanks:=True, Transpose:=False
I also used this:
Code:
Selection.Value = Selection.Value
The worksheet where I try to apply this is a database report where certain numbers are in text format and therefore I need to convert them to numbers before using the in my models.
I also noticed that the probelm occurs when the initial value has either a comma (,) or point (.) in it. For example, a text 21,1 cannot be converted but the text 21 can.
Also dates, like 31.12.2012 have the same problem.
Can this be fixed somehow?
Last edited: