View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default removing comma in data string

If you put these in unused cells:
=len(a1)
=isnumber(a1)
(Change A1 to the cell that is having trouble)

What is returned (for the 357041 cell)?

If you don't see 6 for the =len() formula, then you probably won't see True for
the =isnumber() formula.

My bet is that you have other characters in those cells.

If the data came from the web, you could have those non-breaking HMTL spaces in
your cell.

David McRitchie has a macro that can help clean up:
http://www.mvps.org/dmcritchie/excel/join.htm#trimall
(look for "Sub Trimall()")

And if you're new to macros, you may want to read David's intro:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

wrote:

On Jan 3, 2:28 pm, Dave Peterson wrote:
How about selecting the range to fix
edit|Replace
what: , (a comma)
with: (leave blank)
replace all



wrote:

I have a string of numbers, but they've been entered as:


357,041
332,224
341,038


etc.


Basically I'd just like to convert them to numbers so I can add,
subtract, etc. The problem is that as they are right now, they are
stored as text, and I can't figure out how to fix that (format cells
number does nothing).


Please help.


--

Dave Peterson


I really can't format anything. I tried making it a currency, date,
time, anything other than what it is, and it won't do it.

Any thoughts?


--

Dave Peterson