View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
A.W.J. Ales A.W.J. Ales is offline
external usenet poster
 
Posts: 63
Default different ver Excel - problem with decimal separator (for experts)


Mark,

The problem is that the thousands seperator points you want to remove just
are not there in Excel. It just shows it in the cell.
Try : Input a large number in A1 and format the cell such that Excel show
the thousands seperators.
Now run this simple routine to shwo that they actually are NOT part of the
number.
Sub RemoveItNot()
A = Cells(1, 1).Value
MsgBox A
End Sub


--
Regards,
Auk Ales

* Please reply to this newsgroup only *
* I will not react on unsolicited e-mails *

"Mark" wrote in message
...
I have problem with formating data. I work in non-english
ver. Excel, where decimal separator is "," (no "." as
English).


Currently my each cell in raport cointain data like this
below:
e.g.
1.512,00
403,22
4.649.019,11
data imorted with txt file.

I'd like remowe "." by simple code:
Selection.Replace What:=".", Replacement:="",_
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False

Unfortunatelly VBA code remove "," for cell with 403,22 in
result 40322 (sometime work rightly sick!) and "."
12.555,52 in result 12555,55 (right).

Whats wrong in my code?
Is there any way to pass round this error.
Please help me.
Regards
Mark