LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default problem with double value


I have a xml document, and one of it's values is a number in the format
1,5. And i need to insert in a excel cell that value * an integer, the
problem is that when i convert 1,5 to double i got 15 instead of 1.5. I
tried modifying the format of the number to 1.5 or replacing the , with
a . but with no success. If i don't convert the number to double i got
only 1.

Now i convert 1.5 to 15 and then multiply it by the integer and then
divide it by 10. It works, but it's not elegant, and the thing is that
in the xml document i can have 1,5 or an integer, and in that case i
can't divide by 10. So i need to compare the number in search of a ,
before converting it.


Is there any way around more elegant?

Thanks,


--
Jlorga
------------------------------------------------------------------------
Jlorga's Profile: http://www.excelforum.com/member.php...o&userid=31707
View this thread: http://www.excelforum.com/showthread...hreadid=517324

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
double axis, double problem (i hope only to me) kitcho Charts and Charting in Excel 1 December 30th 06 12:52 AM
Cell double-clicking problem vbMark Excel Discussion (Misc queries) 4 August 30th 06 08:09 PM
Double entry problem Jesper Perregaard Excel Discussion (Misc queries) 1 August 18th 05 11:26 AM
Double Subtotal Problem {Excel 2000} PGibson Excel Programming 2 November 9th 03 01:25 PM
Formatting Problem on Double-Zero String Tom Ogilvy Excel Programming 1 July 18th 03 06:56 PM


All times are GMT +1. The time now is 03:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"