View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ardus Petus Ardus Petus is offline
external usenet poster
 
Posts: 718
Default Replacing spaces with zeros

Try: Selection.Replace instead of Cells.Replace

HTH
--
AP

"Oldjay" a écrit dans le message de news:
...
I have the following

Sub FillZeros()

Sheets("Records").Select
Range("N2:N500").Select
Application.CutCopyMode = False
Cells.Replace What:="", Replacement:=0, LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False

End Sub

When I run it I get 5 additional cols of zeros

Oldjay