If you want a simple Search Macro try this one:
Sub SearchAndHighlight()
Dim ThisArea As Range, SearchMe As String
Sheets("Sheet1").Activate
SearchMe = InputBox("Write here what you're looking for.")
If IsEmpty(SearchMe) Then Exit Sub
Set ThisArea = Sheets("Sheet1").Cells.Find(SearchMe, lookat:=xlWhole)
If ThisArea Is Nothing Then
MsgBox SearchMe & " - " & "There is no such entry."
Else
Cells.Interior.ColorIndex = xlColorIndexNone
ThisArea.Interior.ColorIndex = 6
End If
End Sub
This opens an input box which tells you to write what you're looking for in
the worksheet, and when you press OK or Enter it highlights the found cell,
otherwise it will open up a message box telling you "There is no such entry."
I presume that you have some working knowledge with macros, otherwise tell me.
Swisse
|