Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to have Excel highlight search results, or specific text that you're looking for? I really appreciate these features as they are in Firefox and IntelliJ IDEA.

share|improve this question
up vote 1 down vote accepted

I googled your demand and found out that you can use a macro to do this.

Sub FindHighlight()
Dim tempCell As Range, Found As Range, sTxt, FoundRange, Response As Integer
Set Found = Range("A1")
sTxt = InputBox(prompt:="Enter value for search", Title:="VoG's Finder")
If sTxt = "" Then Exit Sub
Set tempCell = Cells.Find(what:=sTxt, After:=Found)
If tempCell Is Nothing Then
MsgBox prompt:="Not found", Title:="VoG's Finder"
Exit Sub
Set Found = tempCell
Set FoundRange = Found
End If
Set tempCell = Cells.FindNext(After:=Found)
If Found.Row >= tempCell.Row And Found.Column >= tempCell.Column Then Exit Do
Set Found = tempCell
Set FoundRange = Application.Union(FoundRange, Found)
FoundRange.Interior.ColorIndex = 6
Response = MsgBox(prompt:="Clear highlighting", Title:="VoG's Finder", Buttons:=vbOKCancel + vbQuestion)
If Response = vbOK Then FoundRange.Interior.ColorIndex = xlNone
End Sub

When the macro runs it will highlight the found cells and give the option to clear the highlighting. If you want to temporarily keep the highlighting click Cancel. Then, to clear the formatting later on, run the same search and click OK.

Click here to view the source.

share|improve this answer
Great, thanks for the help! – Jon Onstott Jan 23 '10 at 21:40
You're welcome. – Mehper C. Palavuzlar Jan 24 '10 at 17:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.