Rajesh Pathak
24 Dec

How do you build a multi-criteria search engine in Excel?


You can build a multi-criteria search engine in Excel using FILTER to apply multiple logical conditions and CHOOSECOLS to control the output columns. This approach allows dynamic, real-time filtering without VBA, helper columns, or Power Query.


In this article, you will learn how to design a scalable, flexible, and fast search engine that allows users to search data using multiple criteria simultaneously—all with clean formulas and dynamic results. 🚀


📌 Why Build a Multi-Criteria Search Engine in Excel?

Traditional Excel tools like VLOOKUP, XLOOKUP, and INDEX-MATCH are excellent—but they fall short when:

  • You need to search by multiple conditions
  • Users want partial matches
  • Results must auto-expand
  • Columns need to be shown dynamically

That’s where FILTER + CHOOSECOLS shine.

Key Benefits 💡

  • 🔄 Real-time results
  • 🧠 Logic-driven filtering
  • 📊 Auto-spilling tables
  • ⚡ High performance on large datasets
  • 🧩 No redundant helper columns

🧠 Core Concept: How This Search Engine Works

At a high level:

  1. FILTER() applies multiple conditions to your dataset
  2. CHOOSECOLS() controls which columns appear in the output
  3. Boolean logic (*, +) combines criteria
  4. Optional inputs allow flexible searching

📂 Sample Dataset Structure

Assume your raw data is in A1:H1000:

IDNameDepartmentLocationRoleSalaryStatusJoin Date

🧪 Step 1: Create User Input Cells 🧑‍💻

Place search inputs in clearly labeled cells:

CellPurpose
K2Department
K3Location
K4Role
K5Status
K6Minimum Salary

These will drive the search logic.


🔧 Step 2: Basic FILTER Formula

Here’s a multi-criteria FILTER formula:

=FILTER(
  A2:H1000,
  (C2:C1000=K2)*
  (D2:D1000=K3)*
  (E2:E1000=K4)*
  (G2:G1000=K5)*
  (F2:F1000>=K6),
  "No matching records found"
)

📝 Explanation

  • Each condition returns TRUE/FALSE
  • * works as AND logic
  • Only rows where all conditions are TRUE are returned

🔀 Step 3: Add Optional Criteria (Blank-Aware Search)

To allow blank inputs (very important!), modify the logic:

=FILTER(
  A2:H1000,
  ((K2="")+(C2:C1000=K2))*
  ((K3="")+(D2:D1000=K3))*
  ((K4="")+(E2:E1000=K4))*
  ((K5="")+(G2:G1000=K5))*
  ((K6="")+(F2:F1000>=K6))
)

Why This Works 🧠

  • (K2="") returns TRUE when empty
  • + acts as OR logic
  • Blank inputs are ignored automatically

🎯 Step 4: Control Output Columns Using CHOOSECOLS

Let’s say you only want to display:

👉 Name

👉 Department

👉 Role

👉 Salary


Wrap the FILTER formula:

=CHOOSECOLS(
  FILTER(
    A2:H1000,
    ((K2="")+(C2:C1000=K2))*
    ((K3="")+(D2:D1000=K3))*
    ((K4="")+(E2:E1000=K4))*
    ((K5="")+(G2:G1000=K5))*
    ((K6="")+(F2:F1000>=K6))
  ),
  2,3,5,6
)


🚀 Result

  • Clean, user-friendly output
  • No duplicate or unnecessary columns
  • Easy to rearrange columns later

🔍 Step 5: Add Partial Match Search (Advanced)

To enable contains-type searching, use SEARCH():

=FILTER(
  A2:H1000,
  ((K4="")+ISNUMBER(SEARCH(K4,E2:E1000)))
)

This allows users to type:

  • “Man” → matches “Manager”
  • “Dev” → matches “Developer”

Perfect for real-world search engines. 🔥


⚡ Performance Tips for Large Datasets

✔ Use Excel Tables (Ctrl + T)

✔ Avoid volatile functions

✔ Use CHOOSECOLS outside FILTER

✔ Keep ranges tight

✔ Prefer numeric comparisons where possible


🧠 Pro-Level Practice Datasets (For Readers)

Below are ready-to-build datasets:


📘 Dataset 1: Employee Master (Advanced Filters)

EmpIDNameDeptLocationRoleExperienceSalaryStatus


Challenges:

  • Filter by Dept, Role, Location
  • Experience ≥ X years
  • Salary between range
  • Display only Name, Role, Salary

📗 Dataset 2: Sales Transactions Engine

| OrderID | Region | Salesperson | Product | Category | Amount | Month | Year |Challenges:

  • Multi-year filtering
  • Category + Region logic
  • Amount ≥ threshold
  • Output dynamic columns using CHOOSECOLS

📙 Dataset 3: Student Performance Analyzer

| StudentID | Name | Grade | Subject | Score | Result | Teacher | Term |Challenges:

  • Partial subject search
  • Score ≥ input
  • Result = Pass/Fail
  • Hide raw ID columns

📕 Dataset 4: Inventory Search System

| SKU | Product | Category | Supplier | Stock | ReorderLvl | Cost | Status |Challenges:

  • Low stock alert search
  • Supplier-wise filtering
  • Cost range search
  • Display dynamic column order


🧪 Step-by-Step Excel Exercises (With Solutions)

These exercises are designed to move readers from understanding to mastery.

Each exercise increases complexity and mirrors real business use cases


🟢 Exercise 1: Basic Multi-Criteria Filter (Beginner+)

🎯 Objective

Filter employees by:

  • Department
  • Location
    Display only Name and Role


A: EmpID

B: Name

C: Department

D: Location

E: Role

F: Salary



📊 Dataset Columns

A: EmpID

B: Name

C: Department

D: Location

E: Role

F: Salary


🧑‍💻 User Inputs

H2 → Department

H3 → Location

✅ Solution Formula

=CHOOSECOLS(  FILTER(    A2:F500,    (C2:C500=H2)*    (D2:D500=H3)  ),  2,5)


🧠 Key Learning

  • * applies AND logic
  • CHOOSECOLS() controls output visibility
  • Clean separation between data logic and presentation


🟡 Exercise 2: Optional Criteria Search Engine

🎯 Objective

Allow users to leave inputs blank without breaking the search.


🧑‍💻 User Inputs

H2 → Department (optional)

H3 → Location (optional)

H4 → Minimum Salary

✅ Solution Formula

=CHOOSECOLS(  FILTER(    A2:F500,    ((H2="")+(C2:C500=H2))*    ((H3="")+(D2:D500=H3))*    ((H4="")+(F2:F500>=H4))  ),  2,3,5,6)


🧠 Key Learning

  • (H2="") + (condition) enables optional filters
  • + works as OR logic
  • This is the backbone of scalable Excel search systems


🟠 Exercise 3: Partial Text Search (Advanced)

🎯 Objective

Allow users to type partial text (e.g., “Man”) to find “Manager”.


🧑‍💻 User Input

H2 → Role keyword


✅ Solution Formula

=FILTER(  A2:F500,  (H2="")+ISNUMBER(SEARCH(H2,E2:E500)))


🧠 Key Learning

  • SEARCH() enables contains-style search
  • Case-insensitive by default
  • Ideal for job titles, product names, categories

🔴 Exercise 4: Pro-Level Multi-Criteria Search Engine

🎯 Objective

Build a dashboard-ready search engine that filters by:

  • Department
  • Role (partial match)
  • Status
  • Salary ≥ input
    Show only selected columns


H2 → Department

H3 → Role keyword

H4 → Status

H5 → Minimum Salary

✅ Solution Formula

=CHOOSECOLS(  FILTER(    A2:H1000,    ((H2="")+(C2:C1000=H2))*   ((H3="")+ISNUMBER(SEARCH(H3,E2:E1000)))*    ((H4="")+(G2:G1000=H4))*    ((H5="")+(F2:F1000>=H5))  ),  2,3,5,6)


🧠 Key Learning

  • Combines exact match + partial match
  • Fully dynamic and user-driven
  • No helper columns, no VBA, no scripts


FAQ

Q: Can FILTER handle multiple criteria in Excel?
Yes. FILTER can evaluate multiple conditions using logical operators like * (AND) and + (OR), making it ideal for advanced multi-criteria searches.


Q: Is CHOOSECOLS better than deleting columns?
Yes. CHOOSECOLS dynamically controls output visibility without modifying the source dataset, improving model integrity and performance.



🏁 Final Thoughts

With just FILTER() and CHOOSECOLS(), Excel transforms into a powerful, logic-driven search engine—capable of handling enterprise-scale scenarios without complexity.


By combining FILTER() + CHOOSECOLS(), you are not just filtering data—you are engineering a scalable, production-grade search system inside Excel.


If you want your Excel skills to stand out in data analytics, finance, HR, or operations, mastering this pattern is non-negotiable. 💼📊


👉Write in comment section: 

  • How much did you like the post and what insights do you want to add.
  • Share your biggest operational pain point in the comments and if you think that this AI tool is going to solve your problems!

 If you found this article helpful, please share it with a friend! 

See you in the next edition! ✌️ __________________________________________________________ 

I’m a corporate trainer who teaches Microsoft Excel end‑to‑end: foundational spreadsheets and formulas, intermediate data tools, pivot tables, and analytics. Every program is hands‑on and role‑focused for individual learners or corporate cohorts. 


Enroll into any Microsoft Excel online course of your choice: 

Budgeting and Forecasting in Excel

Data Analysis in Excel

Advanced Excel Data Management Program

Intermediate Excel Data Management Program


Disclaimer: This content was prepared with support from an AI‑powered assistant that enhances human creativity to improve clarity, accuracy, and impact. Some visuals in this post were also created with the help of AI to make the ideas clearer and the story more engaging. While I strive for precision, AI tools may occasionally produce errors. Any resemblance to real people or copyrighted works is purely coincidental. Please use this content for informational purposes only.

Comments
* The email will not be published on the website.