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. ๐
Traditional Excel tools like VLOOKUP, XLOOKUP, and INDEX-MATCH are excellentโbut they fall short when:
Thatโs where FILTER + CHOOSECOLS shine.
At a high level:
*, +) combines criteriaAssume your raw data is in A1:H1000:
| ID | Name | Department | Location | Role | Salary | Status | Join Date |
|---|
Place search inputs in clearly labeled cells:
| Cell | Purpose |
|---|---|
| K2 | Department |
| K3 | Location |
| K4 | Role |
| K5 | Status |
| K6 | Minimum Salary |
These will drive the search logic.
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"
)* works as AND logicTo 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))
)(K2="") returns TRUE when empty+ acts as OR logicLetโ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
)To enable contains-type searching, use SEARCH():
=FILTER(
A2:H1000,
((K4="")+ISNUMBER(SEARCH(K4,E2:E1000)))
)This allows users to type:
Perfect for real-world search engines. ๐ฅ
โ Use Excel Tables (Ctrl + T)
โ Avoid volatile functions
โ Use CHOOSECOLS outside FILTER
โ Keep ranges tight
โ Prefer numeric comparisons where possible
Below are ready-to-build datasets:
| EmpID | Name | Dept | Location | Role | Experience | Salary | Status |
|---|
Challenges:
| OrderID | Region | Salesperson | Product | Category | Amount | Month | Year |Challenges:
| StudentID | Name | Grade | Subject | Score | Result | Teacher | Term |Challenges:
| SKU | Product | Category | Supplier | Stock | ReorderLvl | Cost | Status |Challenges:
๐งช 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
Filter employees by:
A: EmpID
B: Name
C: Department
D: Location
E: Role
F: Salary
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)
* applies AND logicCHOOSECOLS() controls output visibilityAllow users to leave inputs blank without breaking the search.
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)
(H2="") + (condition) enables optional filters+ works as OR logicAllow users to type partial text (e.g., โManโ) to find โManagerโ.
H2 โ Role keyword
โ Solution Formula
=FILTER( A2:F500, (H2="")+ISNUMBER(SEARCH(H2,E2:E500)))
SEARCH() enables contains-style searchBuild a dashboard-ready search engine that filters by:
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)
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.
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:
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.