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! โœŒ๏ธ __________________________________________________________ Enroll into any online course of your choice: https://rajeshpathak.graphy.com/s/store


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.