View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
chrisrowe_cr[_3_] chrisrowe_cr[_3_] is offline
external usenet poster
 
Posts: 1
Default 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