Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA Help Please
The code below looks for a text string in column D: "AV1 Swb"
then offsets to a desired position and adds text: "Switchboard" I need to make a modification to this, but am not sure how. Instead of offsetting text, I want to replace the entire entry that contains "AV1 Swb" with "Switchboard". Any help you can provide would be appreciated. Here is the code I have today in a large macro: Set rng = Columns(4).Find(what:="AV1 Swb", _ after:=Range("D1"), LookIn:=xlFormulas, _ lookat:=xlPart, searchorder:=xlByRows, _ searchdirection:=xlNext, _ MatchCase:=False) If Not rng Is Nothing Then fAddr = rng.Address Do rng.Offset(0, -1).Value = "Switchboard" Set rng = Columns(4).FindNext(rng) Loop While rng.Address < fAddr End If |