Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 09-06-2014, 11:12 PM
excelledsoftware excelledsoftware is offline Highlighting Excel FIND Results Windows 7 64bit Highlighting Excel FIND Results Office 2003
IT Specialist
 
Join Date: Jan 2012
Location: Utah
Posts: 455
excelledsoftware will become famous soon enough
Default

I have never had much luck with the find all since usually I am looking in thousands of cells of data. However the code below will highlight any cells on the worksheet orange if there is an exact match and the yellow if there is a partial match. Be sure to save and backup your workbook before running.
Code:
Sub HighlightSearch()

  Dim rng As Range, c As Variant, SearchString As String

    SearchString = InputBox("Search the used range for?")
    If SearchString = "" Then End
    Set rng = ActiveSheet.UsedRange
  
    For Each c In rng
      If InStr(1, UCase(c.Value), UCase(SearchString)) Then
        c.Interior.ColorIndex = 6 'highlights yellow
      End If
      If UCase(c.Value) = UCase(SearchString) Then
        c.Interior.ColorIndex = 45 'highlights orange
      End If
    Next c

End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Find/Replace is not working - Excel 2010 fieldhaven Excel 2 02-19-2014 08:30 AM
2013 search results take a long time - they fill in as results in reverse date order themookman Outlook 0 10-11-2013 12:01 PM
Highlighting Excel FIND Results Find and Replace using Excel range dmarie123 Word VBA 15 04-02-2013 07:54 AM
Highlighting Excel FIND Results Find Results in excel copy the rows to another sheet khalidfazeli Excel 2 02-06-2013 09:38 AM
Needs help to find excel formula- Please aamer_1983 Excel 2 07-13-2009 01:46 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:28 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft