I'm just wonder if there is a simple way of creating a search box in a sheet, that when text is entered, will highlight anything matching within that sheet?
I've looked, but every method people suggest seems complex.
I'm just wonder if there is a simple way of creating a search box in a sheet, that when text is entered, will highlight anything matching within that sheet?
I've looked, but every method people suggest seems complex.
How about find Method? Ctrl+F
If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
Mark your thread as Solved
If the suggestion helps you, then Click *below to Add Reputation
Yeah, my current method :D
I would like a box within the sheet that I can use though.
Ok fine... Just confirm us what needs to be done if there is a/multiple match(es)?
Well there shouldn't be more than one match, but if there is, perhaps highlight both?
I believe the word box refers to excel cell.
Copy the below code and do right click on your sheet tab and select view code and paste the below code.
In the suggested code change the cell reference C3 to your desired cell cell. Return to excel and do the entry and check....
Please Login or Register to view this content.
Thank you for that.
I copy and pasted the code as you said.
However, entering something in the cell doesn't seem to do anything. Any ideas?
The matching cells of that sheet will be highlighted with green color background. Use Ctrl+F and check those matching cells background.
Hi,
It doesn't seem to do anything. I will attach the file to this message for you to take a look at.
Have I done something wrong?
.xls Book1.xlsm
What is this??? lolIf Target.Address(False, False) <> "*C3*" Then Exit Sub
Please remove those stars from the above line...
At the same time remove this line
From the suggested coderFound.Select
Oh! I received an email from ExcelForum when you replied, and in that email it showed your code. Your code there shows the two stars, for some reason I just copy and pasted and didn't even notice them.
Anyway, I removed them and it does work. However after an item is found, it remains highlighted, for some reason.
I mean, if I search for something, the keyword is highlighted. If I search for another word, the old word also remains highlighted. Surely the old keyword should revert to black and white?
Replace the previous code with the below one.
Just do double click on the cell to clear the background colors.
Please Login or Register to view this content.
Hey,
Thanks very much for that.
Although...it doesn't always clear the results. For example, I add MD313 to a cell. Then enter MD313 in the search cell. It finds it correctly, but when I double click the search cell again, it doesn't remove the background colour.
Seems if I search for something with a number within it, it won't clear..
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks