Quick Answer
The IF function in Excel lets you set a condition to test your data, then show one result if that condition is true and another if it’s false. This means you can automate decisions in your spreadsheet, like marking scores as Pass or Fail, without typing in results by hand.
If you’re new to Excel, using the IF function can seem tricky at first. But it’s a very useful skill for many South African workers, helping with tasks like tracking budgets, monitoring deadlines, or managing stock levels. This guide breaks it down step by step and gives examples you can use right away.
What the IF Function Does and Why It Matters
The IF function is a simple way to test something in Excel. You give it a condition (like “is a number greater than 50?”) and then say what to do if it’s true and what to do if it’s false. Its formula looks like this:
=IF(logical_test, value_if_true, value_if_false)
For example, if you want to mark a student’s score as “Pass” if it’s 50 or more and “Fail” if it’s less, the formula would look like this:
=IF(B2 >= 50, "Pass", "Fail")
How to Write Your First IF Formula
To write an IF formula, follow these steps:
- Click the cell where you want the result to appear.
- Type
=IF(to start the formula. - Enter your condition, for example
B2 >= 50. - Type a comma, then enter the result if true, like “Pass” (in quotation marks).
- Type another comma, then enter the result if false, like “Fail” (in quotation marks).
- Close the bracket with
)and press Enter.
This will automatically show “Pass” or “Fail” depending on the score in cell B2.
Practical Examples Where IF Helps in Work
The IF function isn’t just for school marks. Here are some common ways it’s useful in everyday work:
- Budget tracking: Label expenses as “Over Budget” if they go over a limit, or “Within Budget” if they don’t.
- Project deadlines: Check if a task’s due date is before today and mark it “Late” or “On Time”.
- Inventory management: Flag items for “Reorder” if stock is below a set number, else “Stock OK”.
These examples show how IF helps you check and organise your data automatically, saving time and avoiding mistakes.
Using Multiple Conditions and Nesting IFs
Sometimes you need to check more than one condition. You can put one IF function inside another (called “nesting”) or combine IF with AND/OR functions.
Example of a nested IF to grade scores:
=IF(B2 >= 75, "Distinction", IF(B2 >= 50, "Pass", "Fail"))
This checks if the score is 75 or more for “Distinction”, if not it checks if 50 or more for “Pass”, otherwise “Fail”.
Example using AND to check two conditions at once:
=IF(AND(B2 >= 50, C2 = "Yes"), "Eligible", "Not Eligible")
This means the result is “Eligible” only if B2 is 50 or more and cell C2 says “Yes”.
Common Mistakes to Watch Out For
Here are some easy errors beginners often make with IF formulas:
- Not closing the brackets properly. Excel requires every opening bracket to be closed.
- Mixing up commas or semicolons—Excel regional settings might affect this.
- Typing text values without quotes. Always put results like “Pass” inside double quotation marks.
- Forgetting to use $ signs for absolute references when copying formulas to other cells.
- Too many nested IFs making formulas hard to read or manage.
Get More Practise and Skills with EduCourse
Learning to use IF is a great start, but Excel can do a whole lot more. If you want to improve your Excel skills step-by-step and get a certificate for free, check out EduCourse’s Free Excel Certificate Course. It covers formulas like IF along with other useful functions to help you work smarter.





