ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Changing characters (https://www.excelbanter.com/excel-programming/303142-re-changing-characters.html)

keepITcool

Changing characters
 
these safe way to do it, would be to change your writing routine

instead of hardcoding the "." you'll need to use a variable.
all nicely provided by Excel..

?application.DecimalSeparator
,
?application.International(xlListSeparator)
;

very consistent.. isnt it? don't worry there's a long way for the
decimal too :)
?application.International(DecimalSeparator)
,

when you want to use replace..
change "." to chr$(11)
change "," to "."
change chr$(11) to ","

not very likely the chr(11) pops up anywhere else in your file...


if your're coding for xl97+ use application.substitute iso replace
as the later was introduced with xl2000

keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"?B?YmlnIHQ=?=" wrote:

Hi,

My application writes out a text file for use in another software
application which only reads numbers in an English format eg 12,345.67

But I have clients who use a European format eg 12.345,67

So I need to know if there is a funtion I can use to switch all points
(".") to commas (",") and vice-versa, preferably in one easy step.

I know about the Replace function, but AFAIK this only replaces one
substring with another - I need to do two at the same time. Any ideas?

TIA
big t




All times are GMT +1. The time now is 10:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com