How do I change the color the cell becomes when doing a FIND
Two known and common options to search ALL WB sheets.
* Press 'Find all' instead of 'Find' in order to also display a list of all
cells addresses where the searched value was found.
OR:
* Use the following code:
=====================
Sub Find_and_Color()
For Each SH In Sheets
SH.Select
[A1].Select
ActiveSheet.UsedRange.Select
For Each CL In Selection
CL.Select
With Selection
Set C = .Find(ST, LookIn:=xlValues)
If Not C Is Nothing Then
firstAddress = C.Address
Range(C.Address).Select
Temp_Color = Range(C.Address).Interior.ColorIndex
Range(C.Address).Interior.ColorIndex = 4
Do
MsgBox (ST & " was found at " & firstAddress & " in " & SH.Name)
Ind = Ind + 1
Range(C.Address).Interior.ColorIndex = Temp_Color
Set C = .FindNext(C)
Loop While Not C Is Nothing And C.Address < firstAddress
End If
End With
Next
Next
If Ind = 0 Then
MsgBox ST & " Not Found thorough the entire(!) Workbook"
Else
MsgBox ST & " was found " & Ind & " times."
End If
Sheets(1).Select
End Sub
=========
Micky
"Kenny A." wrote:
When I do a FIND or FIND / REPLACE, when Excel finds the value I am looking
for, it highlights the cell, but the highlighted cell is in white, which is
the standard sheet background. How can I change a setting so anytime I try to
do a find, when the cell is found, it shows this cell in a totally different
color say purple or red or yellow etc.. I find sometimes trying to identify
which cell it has selected in a full screen of data can be tough. I jst want
to be able to locate the selected cell easier.
Thanks for your help
|