Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using .Replace
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using .Replace
Hi Bernie
"Area" is OK to use. It's not used in the object model. I believe you mean "Areas". -- Best Regards Leo Heuser Followup to newsgroup only please. "Bernie Deitrick" <deitbe @ consumer dot org skrev i en meddelelse ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find and Replace - Replace with Blank Space | Excel Discussion (Misc queries) | |||
Can I replace a ' at the beginning of a text cell using Replace | Excel Discussion (Misc queries) | |||
Replace dialog should put focus on "Find What" not "Replace With" | Excel Discussion (Misc queries) | |||
find and replace - replace data in rows to separated by commas | Excel Worksheet Functions | |||
How can I use replace(alt+H) for mutiple items needing replace | Excel Worksheet Functions |