Thread: Find Macro
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Find Macro

Click on the cell containing the data you want to find and run:

Sub highlighter()
v = ActiveCell.Value
Sheets("Data").Activate
For Each r In ActiveSheet.UsedRange
If InStr(r.Value, v) 0 Then
r.Interior.ColorIndex = 6
End If
Next
End Sub
--
Gary''s Student - gsnu200905


"StillLearning" wrote:

I've searched past posts and can't seem to find what I'm looking for. What I
want to do is search a worksheet for several key words and when found,
highligh the cell. Where I am searching is in worksheet "Data" and it
contains many columns and many rows. What I want to search for is in
worksheet "Search", which is a listing of words (each in its own cell) that I
want to be able to add to as time goes on (will end up being hundreds of
words). Note that sometimes the search word is part of a cell in the data
field. ie I want to search for the word "red" and be able to find it in a
cell containing "a big red box".
Thanks