Need to have a dot used as decimal symbol, regardless of locale

S

Stefano Gatto

Hello,

I would like to print to a disk file decimal numbers stored in numerical
cells, by using the dot as decimal symbol.
As per my tests, Format(8.26,"0.00") will print either 8.26 or 8,26
depending on the locale. I need 8.26 to be printed regardless of the locale.
Any suggestion?

Thanks,
Stefano Gatto
Have no fear of perfection - you''ll never reach it (Salvador Dali)
 
R

Rick Rothstein

The following expression will give you the output that you asked for, as
text I think (I never have had to deal with international regional issues in
my programming)... it assumes the value is assigned to the Number
variable...

Replace(Format(Number, "0.00"), Format$(0, "."), ".")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top