Magic Search box in Google Sheets
Google Sheets

Magic Search box in Google Sheet


In this article, we have created a magic search box in Google sheets. You can use it to your Sales Data or any other data to quick search. We will explain you all the features and formula which we have used in this Magic Search box in Google Sheet for Sales Data.

Understanding the Magic Search Box

At its core, the magic search box allows you to filter and access specific data within a dataset seamlessly. Imagine having the ability to instantly locate the sales information you need without sifting through endless rows and columns. That’s the convenience the magic search box offers. You can select the field name wherein you want to search and just input the search keyword to get the relevant information.

Magic Search Box: How to use-

Setting Up Your Data Sheet

Data Sheet tab
Data Sheet tab

First, ensure all your sales data resides on the “Data Sheet” tab. This tab acts as the foundation, storing the information you’ll access through the search box.

Configuring the Search Box Sheet Tab

Search Box Sheet Tab
Search Box Sheet Tab

Navigate to the “Search Box Sheet” tab, where we have set up the interactive elements of your magic search box:

  • Top Section Stats: Display key figures such as Total Sales, Discount, Sales, COGS, and Profit at the top for quick reference.
  • Field Name Dropdown: At A3, create a dropdown list including Segment, Country, Product, and Discount Band. This allows you to specify the field you wish to search within.
  • Search Input: The cell at B3, highlighted in yellow, awaits your search keyword. Inputting a keyword here dynamically filters the dataset based on your criteria.

The Magic Formula Explained:

To bring the magic search box to life, we employ a special Google Sheets formula:

=IFERROR(FILTER(Data!A2:M701, left(CHOOSECOLS(Data!A2:M701, MATCH(A3, 6:6, 0)), len(B3)) = B3), "No Data Available")

This formula works wonders by filtering the data in real-time as you type your search keyword and hit the enter. Below is the breakdown of formula:

  • FILTER(Data!A2:M701, …): Filter Function is filtering the range of data to apply the filter to.
  • CHOOSECOLS(Data!A2:M701, MATCH(A3, 6:6, 0)): It is choosing the column where to search in according to the field name selected in the dropdown.
  • left(…, len(B3)) = B3: Matching the beginning of the selected column’s entries to your search keyword, ensuring a match triggers the filter.
  • IFERROR(…, “No Data Available”): Ensures that if no data matches your search then it will show “No Data Available”.

Advantages of the Magic Search Box

  • Efficiency: You can quickly enhance your work efficiency using magic search box. It can quickly locate specific data points within your dataset.
  • Flexibility: Easily switch between different data fields without altering your dataset’s structure.
  • User-Friendly: It is quite user-friendly, just select the field name, input the search keyword and hit the enter.

Best Practices for the Magic Search Box

  • Keep Your Data Organized: You need to ensure that your “Data Sheet” tab remains well-structured and updated.
  • Use Named Ranges: For easier formula management and maintenance, you can use the Named range in google sheet.
  • Educate Your Team: Share how to use the magic search box, boosting overall productivity.


The magic search box in Google Sheets is a game-changer for data analysis and management. By following this guide, you can unlock its full potential, making your data work for you in ways you never imagined. There can multiple scenarios, wherein you can use this magic search box like – Employee Performance, Quick view of available Product Inventory etc.

Frequently Asked Questions with Answers

Q. What is a magic search box?

A Filter formula based template in Google Sheets that allows you to dynamically filter data based on a search keyword.

Q. Can I customize the fields in the dropdown?

Absolutely. You can modify the dropdown to include any fields relevant to your dataset.

Q. What happens if my search returns no results?

We have put an error handler in the formula to display “No Data Available”

Q. Is the magic search box suitable for beginners?

Yes, with its user-friendly setup and straightforward functionality, it’s perfect for users at all levels.


Visit our YouTube channel to learn step-by-step video tutorials


Watch the step-by-step video tutorial:

Click here to get the Template



Meet PK, the founder of! With over 15 years of experience in Data Visualization, Excel Automation, and dashboard creation. PK is a Microsoft Certified Professional who has a passion for all things in Excel. PK loves to explore new and innovative ways to use Excel and is always eager to share his knowledge with others. With an eye for detail and a commitment to excellence, PK has become a go-to expert in the world of Excel. Whether you're looking to create stunning visualizations or streamline your workflow with automation, PK has the skills and expertise to help you succeed. Join the many satisfied clients who have benefited from PK's services and see how he can take your data analysis skills to the next level!

Leave a Reply