Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , , ,

Sponsored Links



How to convert content into number ?

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 13-02-2009
Sean J's Avatar
Member
 
Join Date: Feb 2008
Posts: 631
How to convert content into number ?

I have a new worry that I can not solve VMT.
I have this:
...
Case 6
Range ( "E8") = "159768.02": Range ( "E9") = "191.77": Range ( "E10") = "55,918.80" Range ( "E11") = "67.12 "
...

But what do I need for my values "159,768.02" ... are numbers in my table?
CDbl (...) I always use for my textbox, but here, as it is me who writes the values in advance, I do not know the correct syntax.
Reply With Quote
  #2  
Old 13-02-2009
Aleksandra's Avatar
Member
 
Join Date: May 2008
Posts: 993
Re: How to convert content into number ?

It seems to me that you can use CDbl () here, but there may be a problem with point and the comma.
Try: Range ( "E8") = CDbl ( "159768.02") or Range ( "E8") = CDbl (159,768.02)

Or maybe it directly, by not putting quotation marks: Range ( "E8") = 159768.02
Reply With Quote
  #3  
Old 13-02-2009
Archibald's Avatar
Member
 
Join Date: May 2008
Posts: 1,111
Re: How to convert content into number ?

Well you have a point and a comma in your number. E8 and E10 will never be numbers to Excel. Either you put a point or a comma. But not both.

So to add something to what was said by Aleksandra, if you really want to keep your syntax and comma Point you can do this:
Range ( "E8") = CDbl (Replace ( "159768.02 ",".",""))

Best regards
Reply With Quote
  #4  
Old 13-02-2009
Sean J's Avatar
Member
 
Join Date: Feb 2008
Posts: 631
Re: How to convert content into number ?

it works thank you much ... but with the comma.
Problem solved, thank you much.
Reply With Quote
Reply

  TechArena Community > Software > Software Development


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to convert content into number ?"
Thread Thread Starter Forum Replies Last Post
Convert number to spell currency Harinadhar Windows Software 3 02-04-2011 06:01 PM
How to convert number to text in excel Jevin Software Development 5 31-12-2010 07:32 PM
How to convert a decimal number into words in Excel using VBA? Gandhik Windows Software 3 27-11-2010 12:59 AM
How to convert vb .text to number format Brunoz Software Development 6 04-07-2009 10:18 PM
convert string to number in asp.net Texas Software Development 3 26-06-2009 10:55 AM


All times are GMT +5.5. The time now is 05:20 AM.