View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
bhofsetz[_119_] bhofsetz[_119_] is offline
external usenet poster
 
Posts: 1
Default Findind values in a worksheet and fornatting them


Here is a modified version of the find next code Tom is referring to.
Give it a try


Code
-------------------
Sub FormatFoundValues()
Dim entry As Range, foundentry As Range, firstaddress As String
For Each entry In 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.Address < firstaddress
End If
Next entry
End Su
-------------------


HT

--
bhofset
-----------------------------------------------------------------------
bhofsetz's Profile: http://www.excelforum.com/member.php...fo&userid=1880
View this thread: http://www.excelforum.com/showthread.php?threadid=39099