Let Excel make decisions for you
In Microsoft Excel, the logical tests of the IF function are your tool to check if a statement is TRUE or FALSE and return results accordingly.
IF categorises sales, flags overdue tasks, or passes/fails students. It brings some logical thinking to your spreadsheet.
🔍 What is the IF function?
The IF function tests the given condition and produces one value if TRUE and a different value if FALSE.
Basic syntax:
=IF(logical_test, value_if_true, value_if_false)
For Example:
=IF(A2>=60, "Pass", "Fail")
This means, if the value in cell A2 is 60 or higher, then consider it "Pass"; else, values lower than 60 get tagged as "Fail".
Example (with detailed steps): Categorising Sales
Sales($) |
Category |
1500 |
High |
500 |
Low |
Formula:
=IF(A2>1000, "High", "Low")
This helps Excel label items based on a given threshold.
Nested IF Statements
For double conditions:
=IF(A2>1000, "High", IF(A2>500, "Medium", "Low"))
This classifies sales into three categories.
IF + AND/OR
=IF(AND(A2>1000, B2="Yes"), "Bonus", "No Bonus")
This gives a bonus only if both conditions are met.
=IF(OR(A2="Yes", B2="Yes"), "Proceed", "Hold")
This way, one condition is enough to trigger the "proceed" outcome.
✅ Best Practices for IF Statements
- Be cautious with nested IFs so that they are clear
- When penalising numerous conditions, combine with AND/OR
- Try working on a small range first before using it across a large advancement
- Consider using IFS function in Microsoft Excel 365/2021 for simpler multi-logic
🎓 Learn More with Other Levels
Take your Excel skills to the next level:
-
🌐 Visit our Other Levels Website
-
📺 Watch free tutorials on our Other Levels YouTube Channel, and learn Microsoft Excel from beginner to advanced.
✍️ Other Articles, Tips & Tricks you would like:
- Experience the Power of CONCAT Function in Microsoft Excel
- Microsoft Excel Keyboard Shortcuts to Boost Productivity
- Use VLOOKUP Function Like a Pro in Microsoft Excel
يشارك:
Most Powerful tool Pivot Table Explained
Worksheet Protection for your Spreadsheets in Microsoft Excel