LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 82
Default 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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"