0% found this document useful (0 votes)
237 views47 pages

Search Box in Excel (With Filtering and Dynamic Search Box)

The document provides a comprehensive guide on creating a search box in Excel using various methods, including conditional formatting, the FILTER function, and VLOOKUP. It details step-by-step instructions for implementing these methods to filter and highlight data dynamically based on user input. Additionally, it covers how to create a dynamic search box with a dropdown list for enhanced user experience.

Uploaded by

afoeze1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
237 views47 pages

Search Box in Excel (With Filtering and Dynamic Search Box)

The document provides a comprehensive guide on creating a search box in Excel using various methods, including conditional formatting, the FILTER function, and VLOOKUP. It details step-by-step instructions for implementing these methods to filter and highlight data dynamically based on user input. Additionally, it covers how to create a dynamic search box with a dropdown list for enhanced user experience.

Uploaded by

afoeze1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)


Home » Advanced Excel » Search Box in Excel (With Filtering and Dynamic Search Box)

Search Box in Excel (With Filtering and Dynamic


Search Box)
Written by
Last updated: Jul 3, 2024
MD Tanvir Rahman

Here’s an overview of implementing a search box via the FILTER function.

https://www.exceldemy.com/learn-excel/data-management/search-box/ 1/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Download the Practice Workbook

 Search Box.xlsx

How to Create a Search Box in Excel – 3 Methods


https://www.exceldemy.com/learn-excel/data-management/search-box/ 2/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Method 1 – Conditional Formatting to Highlight Searched Data

Case 1.1 – Using the SEARCH Function in Conditional Formatting


Go to the Home tab.
Expand the Conditional Formatting command.
Click on the New Rule option.

https://www.exceldemy.com/learn-excel/data-management/search-box/ 3/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

https://www.exceldemy.com/learn-excel/data-management/search-box/ 4/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Top Excel Skills You Need to Get Hired

Select the Use a formula to determine which cells to format option from the Select a Rule Type
field.
Insert the following formula in the formula bar.

=SEARCH($E$15, $A5&$B5&$C5&$D5)

$E$15 = UK = Lookup value and $A5&$B5&$C5&$D5 is the range A5:D5 where to search for
matches and highlight.

Click on the Format button.


https://www.exceldemy.com/learn-excel/data-management/search-box/ 5/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Select the background color.


Press the OK button.

https://www.exceldemy.com/learn-excel/data-management/search-box/ 6/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Press OK again.
Excel highlights the data containing UK in the B5:E13 range after inputting UK in the E15 cell.

https://www.exceldemy.com/learn-excel/data-management/search-box/ 7/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Case 1.2 – Inserting the ISNUMBER Function in Conditional Formatting

Select the Use a formula to determine which cells to format option from the Select a Rule Type
field of the Edit Formatting dialog.
Insert the following formula in the formula bar and click on OK:

=ISNUMBER(SEARCH($E$15,B5))

https://www.exceldemy.com/learn-excel/data-management/search-box/ 8/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

E15 = USA matches with the B5 and the rest of the cells accordingly.

We get the gold-highlighted data containing USA in the B5:E13 range after typing USA in the
E15 cell.

https://www.exceldemy.com/learn-excel/data-management/search-box/ 9/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Method 2 – Use the Excel FILTER Function to Create a Search Box


Put a search term in cell E15.
Applying the following formula in B18:

=FILTER(B5:E13,B5:B13=E15, “NO MATCH FOUND”)

E15 = USA matches with the B5:B13 range and picks data from B5:E13 = Array range.
https://www.exceldemy.com/learn-excel/data-management/search-box/ 10/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

The FILTER function is only available on Microsoft 365, Excel 2021, and Excel 2019 versions.

Method 3 – Search Box Formula Using IFERROR and VLOOKUP


Functions
We moved the dataset four columns to the right (to F:I).
https://www.exceldemy.com/learn-excel/data-management/search-box/ 11/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Insert the following formula in the E5 cell to assign a numerical value:

=IFERROR(SEARCH($I$15,G5)+ROW()/100000,"")

From the E5 cell, ROW() = 5 thus ROW()/100000 = 0.00005 and SEARCH($I$15,G5) = 1. Therefore,
IFERROR(SEARCH($I$15,G5)+ROW()/100000,””) = 1.00005 since the IFERROR function prevents
errors.

https://www.exceldemy.com/learn-excel/data-management/search-box/ 12/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Apply the following formula in the D5 cell:

=IFERROR(RANK(E5,$E$5:$E$13,1),"")

The RANK function organizes data in ascending order. E5 = 1.00005 is the lowest in the E5:E13 range
therefore it outputs 1 in the D5 cell.

Insert the following formula in the B5 cell:

https://www.exceldemy.com/learn-excel/data-management/search-box/ 13/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

=SEQUENCE(9)

Apply the following formula in the C5:C13 range:

=IFERROR(VLOOKUP(B5,$D$5:$G$13,4,FALSE),"")

The VLOOKUP function looks for the B5 from the D5:G13 range. 4 means the 4th column = Column G
of the D5:G13 range and FALSE for the exact match.
https://www.exceldemy.com/learn-excel/data-management/search-box/ 14/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

We obtain the information of representative Jason in the 10th row once we type Jason in the I15
cell.

https://www.exceldemy.com/learn-excel/data-management/search-box/ 15/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

How to Create a Filtering Search Box in Excel

Method 1 – Search Within a Single Column


Select the B4:E13 range.
Go to the Insert menu.
Click on the Table command.
https://www.exceldemy.com/learn-excel/data-management/search-box/ 16/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Select the table and go to the Table Design tab, then rename it as Table1 in the Table Name
field.

https://www.exceldemy.com/learn-excel/data-management/search-box/ 17/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Go to the Developer tab.


Click on the Insert command.
Select the Option button.
We inserted two buttons for Country and Representative.

https://www.exceldemy.com/learn-excel/data-management/search-box/ 18/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Select the Option button and right-click on it.


Click on the Format Control option from the context menu.

https://www.exceldemy.com/learn-excel/data-management/search-box/ 19/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

In the Format Control dialog box, select Unchecked from the Value.
Insert 1 in the G2 cell.
Type G2 in the Cell Link field.

https://www.exceldemy.com/learn-excel/data-management/search-box/ 20/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Insert the following formula in the C2 cell:

=FILTER(Table1,ISNUMBER(SEARCH($C$2,INDEX(Table1,0,$G$2))),"No Results!")

https://www.exceldemy.com/learn-excel/data-management/search-box/ 21/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Formula Breakdown
INDEX function catches all the countries’ names from Table1.

SEARCH function figures out C2 = UK from Table1 Thus it returns 1 for each match.

ISNUMBER function converts the 1 into TRUE.

FILTER function gathers 3 data that output TRUE.

Method 2 – Search Within Multiple Columns


Insert the formula as follows in the B7 cell:

=FILTER(Table1,ISNUMBER(SEARCH($E$4,INDEX(Table1,0,1))),

https://www.exceldemy.com/learn-excel/data-management/search-box/ 22/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

FILTER(Table1,ISNUMBER(SEARCH($E$4,INDEX(Table1,0,2))),

FILTER(Table1,ISNUMBER(SEARCH($E$4,INDEX(Table1,0,3))),

FILTER(Table1,ISNUMBER(SEARCH($E$4,INDEX(Table1,0,4))),

FILTER(Table1,ISNUMBER(SEARCH($E$4,INDEX(Table1,0,5))),"No Results!")))))

We get 5 results for USA and UK after typing U in the E4 cell.

https://www.exceldemy.com/learn-excel/data-management/search-box/ 23/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Formula Breakdown
INDEX function catches all the country, representative, product, and Sales (USD) from Table1.
INDEX(Table1,0,1)= range of country, INDEX(Table1,0,2)=range of Representatives, and so on.

SEARCH function figures out E4 = U from Table1 Thus it returns 1 for each match.

ISNUMBER function converts the 1 into TRUE.

FILTER function gathers 5 data that output TRUE.

https://www.exceldemy.com/learn-excel/data-management/search-box/ 24/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

How to Make a Dynamic Search Box in Excel


Convert the names of countries into a unique list by applying the following formula in G18:

=UNIQUE(B5:B13)

https://www.exceldemy.com/learn-excel/data-management/search-box/ 25/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Select the G18:G23 range and rename it as country_list.

https://www.exceldemy.com/learn-excel/data-management/search-box/ 26/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

https://www.exceldemy.com/learn-excel/data-management/search-box/ 27/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Go to the Developer tab.


Expand the Insert option.
Select the Combo Box and place it into the worksheet.

https://www.exceldemy.com/learn-excel/data-management/search-box/ 28/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

https://www.exceldemy.com/learn-excel/data-management/search-box/ 29/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Right-click on the Combo Box.


Click on the Properties from the Context menu list.

https://www.exceldemy.com/learn-excel/data-management/search-box/ 30/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

https://www.exceldemy.com/learn-excel/data-management/search-box/ 31/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Insert H15 in the LinkedCell field.


Type country_list in the ListFillRange field.
Input 2-fmMatchEntryNone in the MatchEntry field.
Any selection from the drop-down list will be written in the H15 cell.

https://www.exceldemy.com/learn-excel/data-management/search-box/ 32/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Get the dropdown list from the ComboBox by disabling the Design Mode.

https://www.exceldemy.com/learn-excel/data-management/search-box/ 33/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

https://www.exceldemy.com/learn-excel/data-management/search-box/ 34/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Inserting the formula below in the F5 cell obtains a serial for the Helper1 column.

=ROWS($E$5:E5)

https://www.exceldemy.com/learn-excel/data-management/search-box/ 35/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Insert the following formula in G5 to obtain a serial for the Helper2 column.

https://www.exceldemy.com/learn-excel/data-management/search-box/ 36/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

=IF(ISNUMBER(SEARCH($H$15,B5)),F5,"")

https://www.exceldemy.com/learn-excel/data-management/search-box/ 37/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Formula Breakdown
SEARCH($H$15,B5) outputs 1 for each match.

ISNUMBER(SEARCH($H$15,B5)) delivers TRUE for each 1 obtained by the SEARCH function.

IF function indicates to write the value of the Helper1 column for TRUE.

Use the following formula in H5 for a serial for the Helper3 column:

=IFERROR(SMALL($G$5:$G$13,F5),"")

https://www.exceldemy.com/learn-excel/data-management/search-box/ 38/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Formula Breakdown

https://www.exceldemy.com/learn-excel/data-management/search-box/ 39/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

SMALL($G$5:$G$13,F5) outputs in ascending order. It finds F5 from the G5:G13 range.

IFERROR function writes the outcome from the SMALL otherwise, leave the cell blank.
Insert the following formula in B16:

=IFERROR(INDEX($B$5:$E$13,$H5,COLUMNS($I$4:I4)),"")

Change the values of the drop-down and you’ll get different results.

https://www.exceldemy.com/learn-excel/data-management/search-box/ 40/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Formula Breakdown

https://www.exceldemy.com/learn-excel/data-management/search-box/ 41/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

COLUMNS($I$4:I4) = 1

INDEX($B$5:$E$13,$H5,COLUMNS($I$4:I4)) = INDEX($B$5:$E$13,2,1) that dictates to pick up the


value of B6 cell which contains UK.

IFERROR writes the value obtained from the result of the INDEX function; otherwise, it leaves blank.

Frequently Asked Questions (FAQs)


Can we use the FIND function instead of the SEARCH function?

It depends on your preference since the FIND function is a case-sensitive function whereas the
SEARCH function doesn’t respond to case sensitivity.

Where is the search button in Excel?

You can enable the search button by pressing Ctrl + F keys. However, to search for a text or number
from the worksheet, go to the Home menu, expand the Find & Select command, and select Find.

What is the search type in Excel?

The Excel SEARCH function is categorized under string or text functions. However, it delivers an
integer output.

Search Box in Excel: Knowledge Hub

https://www.exceldemy.com/learn-excel/data-management/search-box/ 42/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Create a Search Box


Create a Search Box without VBA
Create a Filtering Search Box for Your Excel Data
Create a Search Box for Multiple Sheets
Create a Search Box with VBA
Create Search Box in Excel with Conditional Formatting

<< Go Back to Learn Excel

Get FREE Advanced Excel Exercises with Solutions!

   
0
 Save Facebook Twitter

TAGS: Data Management in Excel

MD Tanvir Rahman
 
MD Tanvir Rahman, BUET graduate in Naval Architecture and Marine Engineering, dedicated over a year to the
ExcelDemy project. He is an Excel and VBA Content Developer. Having authored 50+ insightful articles, he
actively updates and improves over 80 articles, reflecting his commitment to accuracy and currency,
managing day-to-day operations, and analyzing and developing Excel and VBA tutorials. His broad interests
encompass Data Analysis, Advanced Excel, VBA Macro, Excel Templates, Excel Automation, and Excel Power
Query, showcasing a... Read Full Bio

https://www.exceldemy.com/learn-excel/data-management/search-box/ 43/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

2 Comments

OKTO  Reply
Aug 27, 2024 at 9:38 AM

That’s formula is Great, thanks to it

SHAMIMA SULTANA  Reply


Aug 27, 2024 at 1:09 PM

Hello Okto,

You are most welcome. Glad to hear that the formula was great to you. We always try to provide the best useful

working formulas to ease your works.
Keep learning Excel with ExcelDemy!

Regards
ExcelDemy

LEAVE A REPLY

https://www.exceldemy.com/learn-excel/data-management/search-box/ 44/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

 Name  E-mail  Website

Submit

https://www.exceldemy.com/learn-excel/data-management/search-box/ 45/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Recent Posts
Posts from: Data Management in Excel

When to Use Array Formulas vs. Dynamic Arrays in Excel Oops! No related resources found.

Summarizing Excel Sheets with AI Using GPT Excel

Custom Number Formatting with Complex Display Rules in


Excel

Creating a Content Generation Tool in Excel with GPT-3

Advanced Data Cleaning: Power Query vs. Google Sheets’


REGEX

10 Free Excel Templates

About ExcelDemy.com ExcelDemy Connect With Us!


Consulting
ExcelDemy is a place where you can learn Services
Excel, and get solutions to your Excel & Excel
VBA-related problems, Data Analysis with User Reviews
Excel, etc. We provide tips, how to guide, List of Services
provide online training, and also provide Service Pricing  Join ExcelDemy Forum
Excel solutions to your business problems.

Submit Excel
See Our Reviews at Task
Contact | Privacy Policy | TOS

ExcelDemy
Online Training

Create Basic Excel


Pivot Tables

https://www.exceldemy.com/learn-excel/data-management/search-box/ 46/47
11/18/24, 4:24 PM Search Box in Excel (With Filtering and Dynamic Search Box)

Excel Formulas and


Functions
Excel Charts and
SmartArt Graphics
Advanced Excel
Training
Data Analysis Excel
for Beginners

ExcelDemy is a Guiding Tech Media company. Copyright © 2013-2024 ExcelDemy | All Rights Reserved.

https://www.exceldemy.com/learn-excel/data-management/search-box/ 47/47

You might also like