How to Use the IF AND OR Functions in Excel (Multiple Conditions)
To evaluate multiple conditions in Excel, you can combine the IF function with AND or OR. This is great for decision-making logic in dashboards, grades, or reports.
📘 Syntax:
=IF(AND(condition1, condition2), "True Result", "False Result")
=IF(OR(condition1, condition2), "True Result", "False Result")
✅ Example 1 (AND):
=IF(AND(A2>=50, B2>=50), "Pass", "Fail")
Returns "Pass" only if both subjects have ≥ 50 marks.
✅ Example 2 (OR):
=IF(OR(A2="HR", A2="Sales"), "Client-facing", "Other")
Returns "Client-facing" if the department is HR or Sales.
🎯 Use Cases:
- HR: Categorize employees based on age AND experience
- Finance: Highlight overdue invoices if amount > $1000 OR date > 30 days
- Dashboards: Smart KPI flags based on multiple logic checks
💡 Tip:
Use AND() for strict filtering, OR() for more flexible logic, and nest them inside IF() for smart outputs.
For more Excel logic tricks like this, follow ScriptDataInsights.
Comments
Post a Comment