View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
NickH[_3_] NickH[_3_] is offline
external usenet poster
 
Posts: 15
Default Nobody can answer! Problem with commas and dots

Yes, I agree. The underlying value in the cell is just a number without
punctuation.

--
Nick


"Peter T" wrote:

Value 502.200,55


Where are you getting an apparent value like that from. AFAIK, although it
might be displayed like that in a cell, VB/A would read it as 502200d55
where d is the system's decimal separator (not Excel's separator although
typically it's the same).

Regards,
Peter T


"Poppe" wrote in message
...
Thanks for your reply.

I understand your idea, and i thought something similar. But the problem
is
that you can never know where the comma exactly is. There can be different
kinds of values.

With this code:

Value 502.200,55 results into value 502.200.55 (should be 502,200.55)

Value 502.200,5 results into value 502.200.,5 (should be 502,200.5)


The Replace() function can change commas to dots, but situation is the
same.
I have for example 2000 rows of excel chart with mixed values, changing
the
code for all different values is impossible.

I can use code that forces whole windows system wide regional settings to
change while running the code, but that is a dangerous option and not good
coding.