Does your data actually contain "," or just formatted to display them?

Signature
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
"frpascal"
wrote in message
Hi folks,
I need to replace the "," by a "." in many cells to fit another country
decimal separation. My regional parameters use normally ",".
When I do it into Excel with the replace function it is ok and produce the
macro script :
Columns("J:J").Select
Selection.Replace What:=",", Replacement:=".", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
But when I run the macro it change nothing and keep the ","
Thanks for any help !
Pascal
frpascal - 29 Sep 2006 15:10 GMT
The data contains ",".
I found a "solution" :
Price = Worksheets("TRU").Cells(J, 6).Value
entier = Int(Price)
reste = (Price - entier) * 100
Dim chiffr As String
chiffr = Format(entier, 0) + "." + Format(reste, 0)
Worksheets("SEND").Cells(Ind, 10).NumberFormat = "@"
Worksheets("SEND").Cells(Ind, 10) = chiffr
It's not very nice but it works. I'll prefer a Replace function...
Thanks for your help
Pascal
> Does your data actually contain "," or just formatted to display them?