Happy Friday Excellers. Today let’s look at creating a search bar right in an Excel cell in our workbook.
Let’s work through an example. Here is my sample data set.
I have a shortened list of Sales Invoices. I want to use the Cell C3 as a search cell. I want Excel to highlight all of the cells in the data set that match the value that is in Cell C3.
We do this with Conditional Formatting, and using a formula to determine which cells to format.
- Home Tab|Styles Group|Conditional Formatting|Use A Formula To Determine Which Cells To Format
The formula is simple. THE SEARCH Function has 3 arguments
- find_text – The text to find.
- within_text – The text to search within.
- start_num – [optional] Starting position in the text to search. Optional, defaults to 1.
So in our example, we are searching for the text in $C$3 in range starting in E4, we can leave the optional argument start_num so it defaults to 1. If the text in $C$3 is found in E4 then the condition is TRUE, the formatting is applied. Simple.
Want To Watch The Video?
If you want more Excel and VBA tips then sign up to my monthly Newsletter where I share 3 Excel Tips on the first Wednesday of the month and receive my free Ebook, 30 Excel Tips.
If you want to see all of the blog posts in the Formula Friday series you can do so by clicking on the link below.