View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
papou[_9_] papou[_9_] is offline
external usenet poster
 
Posts: 52
Default Find and Highlight

Hi Paul
Here's a sample code.
See also Conditionnal Formatting.

Sub FindIt()
Dim FindWhat$
Dim i&
Dim RngData As Range
Dim FoundIt As Range
FindWhat = "doc"
For i = 1 To WorkSheets.Count
With ThisWorkbook.WorkSheets(i)
Set RngData = .UsedRange
With RngData
Set FoundIt = .Find(FindWhat)
If Not FoundIt Is Nothing Then
FoundIt.Font.ColorIndex = 3
FoundIt.Font.Bold = True
End If
End With
End With
Next i
End Sub

HTH
Cordially
Pascal

"Paul Black" a écrit dans le message de
...
Hi Everyone,

I have quite large Sheets within Several Workbooks.
Does anybody have a Macro that I can type in a "Word(s) OR Value(s)"
and ALL the Words Or Values that Match within that Sheet are
Highlighted in Bold Red for example. The "Edit" & "Find" is a bit
cumbersome.

Thanks in Advance
Paul