View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
[email protected] jkrich@gmail.com is offline
external usenet poster
 
Posts: 6
Default removing comma in data string

On Jan 3, 2:33 pm, wrote:
The following two functions should take care of what you need.

Set (your_range) as range

for each cell in your range

cell.value = curval
curval = Replace(curval, " ", "") ' removes any spaces you might
have
curarray = Split(curval, ",", -1, vbTextCompare) 'creates an array
of the values that are separated by the commas
arraynumb = UBound(curarray) 'determines how many values are in the
array

'process the information

next cell

There's probably a better way of taking care of it, but this method
seems to be working well in my current project

Regards,

Thedude


Well, I was able to get rid of the commas using Dave's method, but the
problem now is that it still won't recognize the data as numbers (I
also have a few percentages in the next column, and those won't
recognize either. If I try to add a comma, or decimal points, it
refuses to do it. Any thoughts?