Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

Numbers w/ correct regional decimal (comma) aren't treated as numbers

Status
Not open for further replies.

ipupkin

Technical User
Jul 29, 2002
26
NL
Hi, All

I use Excel workbook to prepare daily reports. Numerical data for report is fetched (by recorded macro) from CSV file into XLS file where graphs are plotted.

Numbers in CSV file use dot as decimal separator. Regional settings set comma as decimal separator, and I must keep it.

I added recorded "Replace..." command to my data-feching macro to replace all "." with "," through the sheet. And even so points are not plotted on the graph.

But when I click on a cell with "33,5" (for example) and retype manualy "33,5" the point immediately appears on the graph.

It persists with General and with Number format for cells.

Any ideas how to make Excel treat number as number (decimal separator is already correct)?
 
I think the replace command is turning your figures to text - when you then re-enter, they are being treated as numbers.
Try this next time (before you re-enter any numbers)
For Each cel in Selection
cel.value = cel.value*1
next cel
Rgds
~Geoff~
 
Thank you for the idea, ~Geoff~! Though finally, to secure myself from possible headache in future, I reworked system to prepare two versions of CSVs (one with dots and one with commas) and trained user to select right one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top