Hi all, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o></o>
Hope you can help me cus i been everywhere and tried everything already.<o></o>
<o></o>
i need to convert all the numbers in a sheet from text to number format so it would do the calculations. <o></o>
<o></o>
however not all the columns are supposed to be formatted as numbers so i added a loop to identify which ones should be formatted as number. <o></o>
<o></o>
But then on such columns i used the following code to convert text to number: <o></o>
<o></o>
<o></o>
<o></o>
It works great except i need it to convert the whole column except the first line cus tht one is the header. <o></o>
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. <o></o>
<o></o>
Any advice to help me reach my objective would be greatly appreciated. <o></o>
<o></o>
Thank you in advance, <o></o>
<o></o>
Mayra<o></o>
<o></o>
Hope you can help me cus i been everywhere and tried everything already.<o></o>
<o></o>
i need to convert all the numbers in a sheet from text to number format so it would do the calculations. <o></o>
<o></o>
however not all the columns are supposed to be formatted as numbers so i added a loop to identify which ones should be formatted as number. <o></o>
<o></o>
But then on such columns i used the following code to convert text to number: <o></o>
<o></o>
Code:
<o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Verdana] <o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Verdana]Sub ConvertText2Num()<o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Verdana] <o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Verdana]For Each xCell In Selection
xCell.Value = CDec(xCell.Value)
Next xCell<o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Verdana] <o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Verdana]End Sub<o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Verdana] <o:p></o:p>[/FONT][/COLOR]
[COLOR=black][FONT=Verdana]
<o></o>
It works great except i need it to convert the whole column except the first line cus tht one is the header. <o></o>
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. <o></o>
<o></o>
Any advice to help me reach my objective would be greatly appreciated. <o></o>
<o></o>
Thank you in advance, <o></o>
<o></o>
Mayra<o></o>