VBA – Generate custom search engine with Excel

MS Excel has a pretty good search option – you have probably used the Ctrl+F option a lot. Anyway, in the current article I will show you how to generate your own Search Engine. Why would you need it? Because it is way more customizable, than the standard! 🙂 And it looks fancier. In the current example, the search box would search all values, disregarding the spaces in front and in the back in both the searched string and the array with strings. Furthermore, it would disregard the upper and the lower case.

E.g. if you type “LoWerCase ” it would be able to match ” lowercase  “. That is somehow really useful, if you have to build an Excel Application with data, entered from the user. At the end, the cell with the contained value is highlighted and its address appears in a message box. What more for less than 30 lines of code? Here is the way it looks:

SearchBoxExcel

Here comes the code:

Enjoy it! 🙂

About

VBA Developer