IF & IFS Functions
Use IF and IFS to make Excel decisions based on conditions — a core skill for every analyst.
✅ What You Will Learn
The IF function is the most important logical function in Excel. It tests a condition and returns one value if the condition is true, and a different value if it is false. Almost every dashboard, report, or analysis uses IF in some form.
The basic structure is: =IF(condition, value_if_true, value_if_false). The condition can be any comparison — greater than, less than, equal to, not equal to. The values can be numbers, text, another formula, or even another IF (called nesting).
Excel 2019 and later introduced the IFS function, which evaluates multiple conditions in sequence without the visual complexity of deeply nested IFs. For anything beyond two or three conditions, IFS is the cleaner choice.
📋 Employee performance data
| Name | Score | Attendance % | Grade | Bonus Eligible |
|---|---|---|---|---|
| Anjali Singh | 88 | 96 | =IFS formula | =IF formula |
| Rahul Mehta | 72 | 88 | ||
| Priya Kapoor | 91 | 99 | ||
| Amit Sharma | 55 | 75 | ||
| Neha Verma | 78 | 91 |
Syntax
Examples
📌 Key Points to Remember
- ✓Text values inside formulas must be in double quotes — =IF(A1="Yes", ...) not =IF(A1=Yes, ...)
- ✓IFS is available in Excel 2019, Microsoft 365, and Excel Online — not in older versions
- ✓Nested IFs work but become hard to read beyond 3 levels — switch to IFS or SWITCH instead
- ✓IF can return another formula: =IF(A1>0, SUM(B1:B10), 0)
- ✓Leave the false argument blank to return FALSE, or use "" to return an empty cell
🏢 Real-World Application
HR analysts use IFS to automatically categorise hundreds of employees into performance bands (Exceeds / Meets / Below expectations) based on score ranges. Finance teams use IF(AND(...)) to flag transactions that exceed both a value threshold and a frequency threshold for fraud review. These conditional formulas run on thousands of rows in seconds.
⚠️ Common Mistakes to Avoid
❓ Frequently Asked Questions
How many levels of nested IF can Excel handle?
Excel allows up to 64 levels of nesting, but anything beyond 3 becomes hard to read and debug. Use IFS or SWITCH for multiple conditions.
What is the difference between IF and IFS?
IF tests a single condition (with optional nesting). IFS tests multiple conditions in sequence and is much cleaner when you have more than two outcomes.
Can I use IF to return a colour?
No — IF returns values, not formats. To colour cells based on conditions, use Conditional Formatting (covered in a later topic).
✏️ Practice Exercise
In a dataset of 10 student scores (column A), write an IFS formula in column B to assign grades: A for 90+, B for 80–89, C for 70–79, D for 60–69, and F below 60. Then in column C, write an IF(AND()) formula to flag students who scored 75+ AND have attendance above 85% (column D) as "Eligible for Scholarship".
Learn Excel with Live Trainer Guidance
These tutorials give you the foundations. Our live Excel course at EVIKA Academy, Noida teaches you to build real dashboards on actual business data — with a trainer who uses Excel professionally every day.