Thread: Using .Replace
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bernie Deitrick Bernie Deitrick is offline
external usenet poster
 
Posts: 5,441
Default Using .Replace

Jason,

It is a bad idea to use variables that are used within the Object Model
(area is one)

Dim myArea As Range
Set myArea = Sheets("Layout-Bulk (2)").Range("A7:BR53")
myArea.Replace ....

HTH,
Bernie
MS Excel MVP

"Jason Morin" wrote in message
...
How can I find and replace for a certain range? I'd
rather not use Cells.Replace.... and search the entire
sheet:

Sub Worksheet_Activate()
Set area = Sheets("Layout-Bulk (2)").Range("A7:BR53")
For Each cell In area
.Replace What:="##", Replacement:="="
Next cell
End Sub

Thx.
Jason