Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
replace text string in cell automatically
How could I replace a text string in cell programatically?
Tks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
replace text string in cell automatically
Hi Stephen,
How could I replace a text string in cell programatically? Try something like: '============= Public Sub Tester() Dim WB As Workbook Dim SH As Worksheet Dim Rng As Range Set WB = Workbooks("Book1") '<<==== CHANGE Set SH = WB.Sheets("Sheet2") '<<==== CHANGE Set Rng = SH.Range("A1:A10") '<<==== CHANGE Rng.Replace What:="Bill", _ Replacement:="Ben", _ LookAt:=xlPart, _ SearchOrder:=xlByRows, _ MatchCase:=False End Sub '<<============= --- Regards, Norman |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
replace text string automatically in cell | Excel Discussion (Misc queries) | |||
Find and replace part of a text string | Excel Discussion (Misc queries) | |||
Find a string between two delimeters and replace with text | Excel Programming | |||
Excel - Find & Replace text in a string | Excel Programming | |||
Excel - Find & Replace text in a string | Excel Worksheet Functions |