Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
adapting the findnext function
Hi all, I need to adapt the following code that was kindly given to me t include the red bit! I dont know any VB but i would guess that it only a minor mod? Sub FormatFoundValues() Dim entry As Range, foundentry As Range, firstaddress As String For Each entry In Range("b4:h76") **that is equal to an entry i the range j2:j30** Set foundentry = Cells.find(what:=entry.Value) If Not foundentry Is Nothing Then firstaddress = foundentry.Address Do With foundentry.Font .ColorIndex = 5 .Bold = True .Italic = True End With Set foundentry = Cells.FindNext(After:=foundentry) Loop While Not foundentry Is Nothing And foundentry.Addres < firstaddress End If Next entry End Su -- chrisrowe_c ----------------------------------------------------------------------- chrisrowe_cr's Profile: http://www.excelforum.com/member.php...fo&userid=2522 View this thread: http://www.excelforum.com/showthread.php?threadid=39207 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adapting MAX function | Excel Worksheet Functions | |||
Multi line merged cell - adapting to different size input - possible? | Excel Discussion (Misc queries) | |||
Findnext | Excel Discussion (Misc queries) | |||
Help needed with Adapting complex INDEX formula | Excel Worksheet Functions | |||
FindNext | Excel Programming |