Hi all,
Hope you can help me cus i been everywhere and tried everything already.
i need to convert all the numbers in a sheet from text to number format so it would do the calculations.
On selected columns i used the following code to convert text to number:
It works great except for 2 things... one: i need it to convert the whole column except the first line cus tht one is the header.
And secondly it gives me an error if there are any cells that do have number formatting and does not continue formatting the other cells that do not have the number formatting.
Any advice to help me reach my objective would be greatly appreciated.
Thank you in advance,
Mayra
Hope you can help me cus i been everywhere and tried everything already.
i need to convert all the numbers in a sheet from text to number format so it would do the calculations.
On selected columns i used the following code to convert text to number:
Code:
Sub ConvertText2Num()
[color=black][/color]
[color=black][font=Verdana]For Each xCell In Selection
xCell.Value = CDec(xCell.Value)
Next xCell[/font][/color]
[color=black][font=Verdana] [/font][/color]
[color=black][font=Verdana]End Sub[/font][/color]
It works great except for 2 things... one: i need it to convert the whole column except the first line cus tht one is the header.
And secondly it gives me an error if there are any cells that do have number formatting and does not continue formatting the other cells that do not have the number formatting.
Any advice to help me reach my objective would be greatly appreciated.
Thank you in advance,
Mayra