Thread: Delete
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Sheeloo[_3_] Sheeloo[_3_] is offline
external usenet poster
 
Posts: 1,805
Default Delete

You need to first select the range then run the macro below;
Change from your macro = replaces Cells (which means all cells on the
worksheet with Selection)

If you do not want to select the range before running the macro then remove
the ' before the line
' Range("F6:F50").Select
and change 50 to whatever you want...

Use
Sub Macro1()
' Range("F6:F50").Select
Selection.Replace What:="O", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
End Sub

"chrisnsmith" wrote:

Recorded this macro, but I only want it to work in column C from row 6
downward.
What do I need to add?

Cells.Replace What:="O", Replacement:="", LookAt:=xlPart, SearchOrder:= _
xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceForm