Desktop monitor displaying an Excel worksheet in a professional office, representing a beginner guide to using the IF function in Excel.

How to Use the IF Function in Excel: A Simple Guide for Beginners

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:

  1. Click the cell where you want the result to appear.
  2. Type =IF( to start the formula.
  3. Enter your condition, for example B2 >= 50.
  4. Type a comma, then enter the result if true, like “Pass” (in quotation marks).
  5. Type another comma, then enter the result if false, like “Fail” (in quotation marks).
  6. 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.

What is the difference between IF and nested IF functions?
A regular IF tests one condition and returns two possible results. Nested IFs are IF functions placed inside one another to check several conditions in order.
Can the IF function work with text?
Yes, IF can compare text values. Just remember to put text in quotation marks inside the formula.
How is IF used in South African workplaces?
Employees use IF for tasks like checking sales targets, tracking deadlines, managing stock levels, and automating simple pass/fail decisions in reports.
How do I avoid errors when copying IF formulas?
Use absolute references ($ symbols) for cells you don’t want to change, and always test your formulas on a few cells before copying widely.

Naledi Mokoena
Naledi Mokoena

Naledi Mokoena is a workplace training specialist and educational content writer at EduCourse, where she develops practical learning resources focused on office administration, workplace communication, digital skills, productivity, and professional development.

With a strong focus on modern workplace expectations in South Africa, her work helps learners strengthen essential office skills, improve professional confidence, and build knowledge that supports long-term career growth. Her content combines practical workplace insight with accessible online learning designed for both new and experienced professionals.

Articles: 4774