Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

replace point by coma macro in a range

Status
Not open for further replies.

itsmyjob

Mechanical
Apr 11, 2002
2,375
Hi All,

my int setting for decimal is point (.)

I need a CSV file, made from excel, to have coma (,) instead of point(.).

I donno why but for low value it works
0.254 => 0,254 as text (good)
but for higher value it doesnt work
123456.789 => 12 356 789 as value (bad)

when i dont use the macro but the replace function it works...[pc]

the code is :

Range("A1:D5").Select
Selection.Replace What:=".", Replacement:=",", LookAt:=xlPart, SearchOrder:=xlByRows,_ MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False

thanks Have fun,

Eric

catiav5@softhome.net
 
Replies continue below

Recommended for you

That's easy, use the taskbar goto start control panel and open regional and language settings. Goto the Regional tab then select Customize button and set these options:
<Digital symbol> = ,
<Digital grouping> = (select the value with no , or .)
<List Seperator> = ,

Apply or Ok

Start excel and enter some values, then export to .csv!

It works fore me.

P.S.
I work with XP, Regional Settings maybe different in W98, NT
 
Well, thanks anyway but .......

this is not really what i ask for.
what if i dont want to change INT settings ? Have fun,

Eric

catiav5@softhome.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor