Skip to main content

Create a search box in Excel – A step-by-step guide

Author: Siluvia Last Modified: 2025-04-11

Creating a search box in Excel enhances the functionality of your spreadsheets by making it easier to filter and access specific data quickly. This guide covers several methods to implement a search box, catering to different versions of Excel. Whether you're a beginner or an advanced user, these steps will help you set up a dynamic search box using features like the FILTER function, Conditional Formatting, and various formulas.

A screenshot of a dynamic search box in Excel


Easily create a search box with the FILTER function

Note: The FILTER function is available in Excel 2019 and later versions, as well as Excel for Microsoft 365.
The FILTER function provides a straightforward way to dynamically search and filter data. The benefits of using the FILTER function are:
  • This function automatically updates the output as your data changes.
  • The FILTER function can return any number of results, from a single row to thousands, depending on how many entries in your dataset match the criteria you've set.

Here I will show you how to use the FILTER function to create a search box in Excel.

Step 1: Insert a text box and configure properties
Tip: If you only need to type in a cell to search for content and don’t require a prominent search box, you can skip this step and proceed directly to Step 2.
  1. Go to the "Developer" tab, click "Insert" > "Text Box (ActiveX Control)".
    Tip: If the "Developer" tab is not shown on the ribbon, you can enable it by following the instructions on this tutorial: How to show/display developer tab in Excel Ribbon?
    A screenshot of the Developer tab in Excel with the Insert option selected for ActiveX Text Box
  2. The cursor will turn into a cross, and then you need to drag the cursor to draw the text box at the location in the worksheet where you want to place the text box. After drawing the text box, release the mouse.
    A screenshot of the cursor in Excel set to draw a text box on the worksheet
  3. Right click the text box and select "Properties" from the context menu.
    A screenshot of right-clicking on the text box in Excel to open the Properties menu
  4. In the "Properties" pane, link the text box to a cell by entering the cell reference in the "LinkedCell" field. For example, typing "J2" ensures that any data entered in the text box automatically updates in cell J2, and vice versa.
    A screenshot of the Properties pane in Excel where the LinkedCell field is entered
  5. Click the "Design Mode" under the "Developer" tab to exit the "Design Mode".
    A screenshot of the Developer tab in Excel with Design Mode selected

The text box now allows you to enter text.

Step 2: Apply the FILTER function
  1. Before using the FILTER function, copy the original header row to a new area. Here I place the header row under the search box.
    Tip: This approach allows users to clearly see the results under the same column headings as the original data.
    A screenshot showing the header row copied under the search box in Excel to display search results
  2. Select the cell under the first header (e.g. I5 in this example), enter the following formula into it and press the "Enter" key to get the result.
    =FILTER(Sheet2!$A$5:$G$281,Sheet2!$B$5:$B$281=J2,"No data found")
    A screenshot of the FILTER function formula entered in Excel to filter data based on search input
    As shown in the above screenshot, since the text box now has no input, the formula displays the result "No data found" in I5.
Notes:
  • In this formula:
    • "Sheet2!$A$5:$G$281": $A$5:$G$281is the data range that you want to filter on Sheet2.
    • "Sheet2!$B$5:$B$281=J2": This part defines the criteria used to filter the range. It checks each cell in column B, from row 5 to 281 on Sheet2 to see if it equals the value in cell J2. J2 is the cell linked to the search box.
    • "No data found": If the FILTER function does not find any rows where the value in column B equals the value in cell J2, it will return "No data found".
  • This method is case-insensitive, meaning it will match text regardless of whether you type in uppercase or lowercase letters.
Result: Test the search box

Let's now test the search box. In this example, when I enter a customer's name in the search box, the corresponding results will be filtered and displayed immediately.

A screenshot showing the search box in action with results filtered and displayed based on the input


Create a search box using Conditional Formatting

Conditional Formatting can be used to highlight data that matches a search term, indirectly creating a search box effect. This method does not filter out data but visually guides you to the relevant cells. This section will show you how to create a search box using Conditional Formatting in Excel.

Step 1: Insert a text box and configure properties
Tip: If you only need to type in a cell to search for content and don’t require a prominent search box, you can skip this step and proceed directly to Step 2.
  1. Go to the "Developer" tab, click "Insert" > "Text Box (ActiveX Control)".
    Tip: If the "Developer" tab is not shown on the ribbon, you can enable it by following the instructions on this tutorial: How to show/display developer tab in Excel Ribbon?
    A screenshot showing the text box option selected in Excel's Developer tab for creating a search box
  2. The cursor will turn into a cross, and then you need to drag the cursor to draw the text box at the location in the worksheet where you want to place the text box. After drawing the text box, release the mouse.
    A screenshot showing the process of drawing a text box in Excel to place for search input
  3. Right click the text box and select Properties from the context menu.
    A screenshot showing the Properties menu in Excel where a text box is linked to a cell
  4. In the "Properties" pane, link the text box to a cell by entering the cell reference in the "LinkedCell" field. For example, typing "J3" ensures that any data entered in the text box automatically updates in cell J3, and vice versa.
    A screenshot of the Properties pane where a text box is linked to cell J3 in Excel
  5. Click the "Design Mode" under the "Developer" tab to exit the "Design Mode".
    A screenshot of the Excel Developer tab with the Design Mode option highlighted to exit design mode

The text box now allows you to enter text.

Step 2: Apply the Conditional Formatting for searching data
  1. Select the entire data range to be searched. Here I select the range A3:G279.
  2. Under the "Home" tab, click "Conditional Formatting" > "New Rule".
    A screenshot showing the Conditional Formatting New Rule option selected in Excel's Home tab
  3. In the "New Formatting Rule" dialog box:
    1. Select "Use a formula to determine which cells to format" in the "Select a Rule Type" options.
    2. Enter the following formula into the "Format values where this formula is true" box.
      =$B3=$J$3
      Here, "$B3" represents the first cell in the column you want to match with the search criteria in the selected range, and "$J$3" is the cell linked to the search box.
    3. Click the "Format" button to specify a fill color for the search results.
    4. Click the "OK" button. See screenshot:
      A screenshot showing the New Formatting Rule dialog box with a formula entered for Conditional Formatting in Excel
Result

Let’s now test the search box. In this example, when I enter a customer’s name into the search box, the corresponding rows that contain this customer in column B will be immediately highlighted with the specified fill color.

A screenshot showing the search box in action, highlighting matching rows in Excel based on the search input

Note: This method is case-insensitive, meaning it will match text regardless of whether you type in uppercase or lowercase letters.

Create a search box with formula combinations

If you are not using the latest version of Excel and prefer not to only highlight rows, the method described in this section may be helpful. You can use a combination of Excel formulas to create a functional search box in any version of Excel. Please follow the steps below.

Step 1: Create a list of unique values from the search column
Tip: The unique values in the new range are the criteria I will use in the final search box.
  1. In this case, I select and copy the range "B4:B281" to a new worksheet.
  2. After pasting the range in a new worksheet, keep the pasted data selected, go to the "Data" tab and select "Remove Duplicates".
    A screenshot of the Remove Duplicates option in Excel
  3. In the opening "Remove Duplicates" dialog box, click the "OK" button.
    A screenshot of the Remove Duplicates dialog box in Excel
  4. A "Microsoft Excel" prompt box then pops up to show how many duplicates are removed. Click "OK".
    A screenshot of the Remove Duplicates confirmation prompt in Excel
  5. After removing duplicates, select all the unique values in the list, excluding the header, and assign a name to this range by entering it in the "Name" box. Here I named the range as "Customer".
    A screenshot of the Assign Name dialog box in Excel
Step 2: Insert a combo box and configure properties
Tip: If you only need to type in a cell to search for content and don't require a prominent search box, you can skip this step and proceed directly to Step 3.
  1. Go back to the worksheet containing the data set you want to search. Go to the "Developer" tab, click "Insert" > "Combo Box (ActiveX Control)".
    Tip: If the "Developer" tab is not shown on the ribbon, you can enable it by following the instructions on this tutorial: How to show/display developer tab in Excel Ribbon?
    A screenshot of the Combo Box insertion in Excel
  2. The cursor will turn into a cross, and then you need to drag the cursor to draw the combo box at the location in the worksheet where you want to place the search box. After drawing the combo box, release the mouse.
    A screenshot of the Combo Box drawn on an Excel worksheet
  3. Right click the combo box and select "Properties" from the context menu.
    A screenshot of the Combo Box properties in Excel
  4. In the "Properties" pane:
    1. Link the combo box to a cell by entering the cell reference in the "LinkedCell" field. Her I type "M2".
      Tip: Specify this field ensures that any data entered in the combo box will automatically update in cell M2, and vice versa.
    2. In the "ListFillRange" field, enter the "range name" you specified for the unique list in Step 1.
    3. Change the "MatchEntry" field to "2 – fmMatchEntryNone".
    4. Close the "Properties" pane.
      A screenshot of the Combo Box properties pane in Excel
  5. Click the "Design Mode" under the "Developer" tab to exit the Design Mode.
    A screenshot of the exit Design Mode button in Excel

You can now select any item from the combo box or type in the text to search for.

Step 3: Apply formulas
  1. Create three helper columns adjacent to the original data range. See screenshot:
    A screenshot of the helper columns setup in Excel
  2. In the cell (H5) under heading of the first helper column, enter the following formula and press "Enter".
    =ROWS($B$5:B5)
    Here "B5" is the cell containing the first custmer's name of the column to be searched.
    A screenshot of the first formula entered in Excel for helper columns
  3. Double click the lower right corner of the formula cell, the following cell will automatically fill in the same formula.
    A screenshot of the automatic filling of formula cells in Excel
  4. In the cell (I5) under the second helper column header, enter the following formula and press "Enter". And then double click the lower right corner of the formula cell to automatically fill the cells below with the same formula.
    =IF(ISNUMBER(SEARCH($M$2,B5)),H5,"")
    Here "M2" is the cell linked to the combo box.
    A screenshot of the second formula entered for helper columns in Excel
  5. In the cell (J5) under the third helper column header, enter the following formula and press "Enter". And then double click the lower right corner of the formula cell to automatically fill the cells below with the same formula.
    =IFERROR(SMALL($I$5:$I$281,H5),"") 
    A screenshot of the third formula entered for helper columns in Excel
  6. Copy the original header row to a new area. Here I place the header row under the search box.
    A screenshot of the header row copied in Excel for the result range
  7. Select the cell under the first header (e.g. L5 in this example), enter the following formula into it and press the "Enter" key.
    =IFERROR(INDEX($A$5:$G$281,$J5,COLUMNS($L$4:L4)),"")
    Here "A5:G281" is the entire data range that you want to displayed in the result cell.
    A screenshot of the result formula entered under the header in Excel
  8. Select this formula cell, drag the "Fill Handle" to the right and then down to apply the formula to the corresponding columns and rows.
    A screenshot of the formula applied to the result range in Excel
    Notes:
    • Since there is no input in the search box, the results of the formula will show the raw data.
    • This method is case-insensitive, meaning it will match text regardless of whether you type in uppercase or lowercase letters.
Result

Let's now test the search box. In this example, when I enter or select a customer's name from the combo box, the corresponding rows that contain that customer name in column B will be filtered and immediately displayed in the result range.

A screenshot of the final search box result in Excel


Creating a search box in Excel can significantly improve how you interact with your data, making your spreadsheets more dynamic and user-friendly. Whether you choose the simplicity of the FILTER function, the visual assistance of Conditional Formatting, or the versatility of formula combinations, each method provides valuable tools to enhance your data manipulation capabilities. Experiment with these techniques to find which works best for your specific needs and data scenarios. For those eager to delve deeper into Excel's capabilities, our website boasts a wealth of tutorials. Discover more Excel tips and tricks here.


Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!