LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default How to remove the spaces in currency format?

Select any one cell with one of these "spaced out" numbers in it and run
this macro...

Sub IDtheApparentBlank()
Dim X As Long
For X = 1 To Len(ActiveCell.Value)
If Mid(ActiveCell.Value, X, 1) Like "[!0-9 -+]" Then
MsgBox Asc(Mid(ActiveCell.Value, X, 1))
Exit For
End If
Next
End Sub

What number was displayed in the MessageBox?

--
Rick (MVP - Excel)


"Robert" wrote in message
...
Rick,
Thanks for your quick answer. But that doesn't work:
The InStr(C.Value, " ") function doesn't find the space: obviouly the " "
is not the same that the space in thousand separator in number. The
fucntion always returns 0. :-(
Any idea ?
Thanks again

Robert

"Rick Rothstein" a écrit dans le
message de news: ...
Select the entire column with your "spaced out" numbers and then run this
macro...

Sub RemoveAllSpace()
Dim C As Range
For Each C In Intersect(Selection, ActiveSheet.UsedRange)
If InStr(C.Value, " ") Then C.Value = Replace(C.Value, " ", "")
Next
End Sub

--
Rick (MVP - Excel)


"Robert" wrote in message
...
Hello,

I received a lot of currency data (in euros) but when numbers are
greater than 999, they have a space for the thousands, like ?1 250. So
the numbers greater than 999 are understood by Excel as text. I can
remove manually this space, but the columns are very long ;-(
Is it possible to remove this space with a VBA procedure which will run
all along the selected column ?
Thanks for your help






 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add new currency Symbol in Format/Cell/Currency NOORZAD Excel Discussion (Misc queries) 2 June 22nd 09 07:59 AM
How to remove the spaces in currency format? Robert[_36_] Excel Programming 1 April 4th 09 08:25 PM
How to remove the spaces in currency format? Dave Peterson Excel Programming 1 April 4th 09 07:42 PM
how do I remove leading spaces and leave the remianing spaces w Debi Excel Worksheet Functions 6 February 28th 07 03:29 PM
Conversion from currency value to currency text format Frank Kabel Excel Programming 1 August 18th 04 10:06 PM


All times are GMT +1. The time now is 06:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"