View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
David McRitchie David McRitchie is offline
external usenet poster
 
Posts: 903
Default String to number

The comma represents a decimal point in his regional settings
or at least wherever he got his data. Not everyone uses the
US Regional settings.

However that does bring up an interesting point. How will the
VBA in the TrimALL macro treat this. I think it will work fine
because it is simply reentering a value.


"Simon Chang" wrote...
Perhaps you should remove the comma too.


"Alf" wrote in message
...

Importing from database to Excel numbers are converted to strings (ex
676 921,5)

I've tried to convert this to number by using "Paste Special" -
Multiply.
Did not work.

I then tried "Replace(" ","") and neither did this work.

I do think that the "space" in the number is not the normal
"space" (Unicode (Hex) 0020) but the "No-Breake Space" (Unicode (Hex)
00A0).

So if anybody could give me a hint of how to solve this problem (VBA by
preference) I would be verry happy. F2 works of cource but editing
several columns with 500 rows is not a job I'm looking forward to.

Alf


--
Alf
------------------------------------------------------------------------
Alf's Profile:

http://www.excelforum.com/member.php...fo&userid=7112
View this thread: http://www.excelforum.com/showthread...hreadid=482662