Thread: Help with loop
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Help with loop

Hi Kima,

Am Sun, 4 Nov 2012 16:30:49 +0000 schrieb kima:

I would like to make a loop of this on column G. But cant make the loop.


try:

Sub ChangeIt()
Dim LRow As Long

LRow = Cells(Rows.Count, "G").End(xlUp).Row

With Range("G1:G" & LRow)
.Replace What:=".", Replacement:=",", _
LookAt:=xlPart, SearchOrder:=xlByRows
.NumberFormat = "0.00"
.TextToColumns Destination:=Range("G1"), _
DataType:=xlFixedWidth, FieldInfo:=Array(0, 1), _
TrailingMinusNumbers:=True
End With

End Sub

Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2