Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search function in excel

Status
Not open for further replies.

DanUK86

Technical User
Sep 29, 2007
9
GB
Ive created an excel spreadsheet for work to search available fitters but ive created a search string with an application box but my problem is it only highlights one word in the sheet. If i had dog in A1 and dog in B1 it would only highlight dog in A1, any one advise me on what i can do to get it to highlight all the words its found. Unformtunatley i haven't got my code with me as its on the work pc. If needed i can get hold of it. Thanks for any help.
 



How about searching in HELP for beforesave?

Don't give up. There are solutions. Get some moxie here! There are reasons that the code may not be working for you the way that you are using it.

One thing is that in some cases, range objects work WITHOUT sheet and workbook objects. In other cases they don't.

So to cover all the bases, and assuming that you are working with only ONE WORKBOOK...
Code:
Sub ClearHighlights()
    [b][red]Worksheets("[i][u]YourSheetName[/u][/i]").[/red][/b]Cells.Interior.ColorIndex = xlNone 'or choose a colorindex - use this code to clear all also


Skip,
[sub]
[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top