View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Susan Susan is offline
external usenet poster
 
Posts: 1,117
Default replacing , with nothing ?

i used the macro recorder & it worked that way.
xxxxxxxxxxxxx
Sub test()
'
' test Macro
' Macro recorded 10/30/2006 by Susan

Columns("G:G").Select
Selection.Replace What:=",", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False

End Sub
xxxxxxxxxxxxxxxxxxx
the code looks the same - don't know why yours isn't working.
susan


sverre wrote:
I have written below code to get rid of commas (,). But the problem is that
it does not work.

Data looks like this:

249,29 (screen)

249,291 (in the cell)

I want it to look like this (after the comma is removed...)

249291



Sub test()
'

Columns("G:G").EntireColumn.Select
Selection.Replace What:=",", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub