PC Review


Reply
Thread Tools Rate Thread

Convert text into number code

 
 
New Member
Join Date: Feb 2010
Posts: 1
 
      17th Feb 2010
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:



Code:
Sub ConvertText2Num()

For Each xCell In Selection
xCell.Value = CDec(xCell.Value)
Next xCell

End Sub


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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
convert text string to a number code =?Utf-8?B?cmFtb24=?= Microsoft Excel Misc 5 11th Apr 2007 05:02 PM
Convert a Number Code to a Text Code =?Utf-8?B?VHJheWU=?= Microsoft Excel Misc 3 6th Apr 2007 09:54 PM
Code to convert text input to a number FCC Microsoft Excel Programming 3 7th Aug 2006 09:54 AM
Convert text strings to a code or number =?Utf-8?B?TWF4TlkyMw==?= Microsoft Excel Worksheet Functions 15 23rd Mar 2006 10:47 PM
convert text-format number to number in excel 2000%3f =?Utf-8?B?TGFycnk=?= Microsoft Excel Misc 1 29th Jul 2005 08:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:19 AM.