PDA

View Full Version : Solved: Delete , in column A.



Marcster
10-28-2005, 06:18 AM
Hi people,

In column A I have data as follows:

abc, ltd
something,
12, 345

I need a procedure to change the data so it displays as:

abc ltd
something
12 345

The procedure should find and delete the ,
if found in column A. The location of , will differ and
sometimes the cell will not have a , in it at all.
Also the length of column A will vary too.

Thanks,

Marcster.

Killian
10-28-2005, 06:25 AM
So you want to find "," in column A and replace with "" ?
Columns("A:A").Replace What:=",", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False

Marcster
10-28-2005, 06:43 AM
Hi Killian,
I want to find "," in column A and replace with " "

When I run the code I get:
Run-time error '1004':
Application-defined or object-defined error

Any ideas, thanks,

Marcster.

Killian
10-28-2005, 07:33 AM
Well I don't,
at least until I tried it in Excel 97, then I did
so I tried thisColumns("A:A").Replace What:=",", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=Falsethen I didn't again
Which version are you running?

Marcster
10-28-2005, 07:48 AM
Thanks Killian,

Works great. I'm using Excel 2000.

Marcster.