Excel IF function practice exercises test a condition and return one of two values — for example, =IF(B2>=40,”Pass”,”Fail”). This page gives you 10 graded exercises covering IF, AND, OR, NOT, IFS and IFERROR, each with a full worked solution you can verify in Excel or Google Sheets right now. No login or download needed.
- The IF function is the single most-used logical function in Excel. Master it and every other logical formula becomes easier.
- This page covers IF, AND, OR, NOT, IFS and IFERROR with real worked examples.
- Exercises are graded: beginner and intermediate, with a printable formula list included at the end.
- All solutions are provided so you can check your answers immediately.
- According to LinkedIn’s Jobs on the Rise 2024 report, data analyst positions grew 25% year-on-year in India — spreadsheet skills are a baseline requirement for almost every one of those roles.
How to Use These Excel IF Function Practice Exercises
Open a blank Excel workbook before you start reading. Type the sample data shown in each exercise into your sheet, then write the formula yourself before looking at the solution. That gap between attempt and answer is where the actual learning happens.
If you are completely new to Excel formulas, do not worry. Each exercise explains the syntax first, then gives you a scenario, then shows the answer. Think of this as an excel if formula tutorial that teaches by doing rather than by reading theory.
How Excel’s IF Function Works
The IF function tests a condition and returns one value when the condition is true and another when it is false. The syntax is:
=IF(logical_test, value_if_true, value_if_false)
For example, =IF(A2>=50,”Pass”,”Fail”) checks whether the value in A2 is 50 or more. If it is, the cell shows “Pass”. If not, it shows “Fail”. That is the core idea everything else builds on.
A Quick Excel IF Formula List
| Function | Syntax | What it does |
|---|---|---|
| IF | =IF(test, true, false) | Returns one of two values based on a condition |
| AND | =AND(cond1, cond2, …) | TRUE only when all conditions are met |
| OR | =OR(cond1, cond2, …) | TRUE when at least one condition is met |
| NOT | =NOT(condition) | Reverses the logical result |
| IFS | =IFS(test1, val1, test2, val2, …) | Tests multiple conditions in sequence (Excel 2019+) |
| IFERROR | =IFERROR(value, value_if_error) | Returns a fallback when a formula produces an error |
| Nested IF | =IF(test1, val1, IF(test2, val2, val3)) | Chains multiple IF checks inside one formula |
Save this table. It is essentially your excel if formula list for everyday work, and it is the same set of functions that appear in most data analyst interview questions involving spreadsheet skills.
Beginner Excel IF Function Practice Exercises
These five exercises cover the core IF function and simple combinations with AND and OR. Each one uses realistic data you would actually encounter in an office or academic setting in India — from student marks to Bengaluru-based fintech sales dashboards.
Exercise 1: Pass or Fail
Scenario: Column A holds student names, column B holds their marks out of 100. Write a formula in C2 that shows “Pass” if the mark is 40 or above, and “Fail” otherwise.
Sample data:
| Name | Marks (out of 100) | Expected Result |
|---|---|---|
| Priya | 72 | Pass |
| Rahul | 38 | Fail |
| Sneha | 55 | Pass |
| Arjun | 40 | Pass |
Solution: =IF(B2>=40,”Pass”,”Fail”)
Copy the formula down to C5. Priya, Sneha and Arjun pass. Rahul fails. Common mistake: writing =IF(B2>40,…) misses the “equal to 40” case, so a student with exactly 40 marks incorrectly gets “Fail”.
Exercise 2: Salary Bonus Flag
Scenario: Column A has employee names, column B has monthly sales in rupees. Flag employees who sold more than Rs. 1,00,000 as “Bonus Eligible”, everyone else as “Standard”.
Solution: =IF(B2>100000,”Bonus Eligible”,”Standard”)
Exercise 3: IF with AND (Both Conditions Must Be True)
Scenario: A student must score at least 40 in Theory (column B) AND at least 40 in Practical (column C) to pass. Write the formula in D2.
Solution: =IF(AND(B2>=40,C2>=40),”Pass”,”Fail”)
AND returns TRUE only when every argument inside it is true. This is one of the most common excel if and or formula patterns in any MIS or HR spreadsheet used by Indian enterprises, including large IT firms like TCS and Infosys.
Exercise 4: IF with OR (Either Condition Qualifies)
Scenario: A bank flags an account for review if the balance drops below Rs. 500 OR if there have been more than 5 transactions in a day. Balance is in column B, transaction count in column C.
Solution: =IF(OR(B2<500,C2>5),”Review”,”Clear”)
Exercise 5: Simple IFERROR
Scenario: Column A has sales figures, column B has target values. Column C divides A by B. Some targets are zero, causing a #DIV/0! error. Replace the error with “No Target Set”.
Solution: =IFERROR(A2/B2,”No Target Set”)
On the job, IFERROR is used constantly. Raw data is messy, and errors in one cell can break an entire dashboard. Wrapping calculations in IFERROR is considered standard professional practice.
Intermediate Excel IF Function Practice Exercises
These five exercises use nested IF, IFS, NOT and combinations you would find in real reporting work. If you are preparing for a role as a data analyst, check out our guide on data analyst kaise bane to see how these skills fit the bigger picture.
Exercise 6: Nested IF Formula Excel (Grade Assignment)
Scenario: Assign letter grades based on marks: 90+ is A, 75-89 is B, 60-74 is C, 40-59 is D, below 40 is F.
Solution: =IF(B2>=90,”A”,IF(B2>=75,”B”,IF(B2>=60,”C”,IF(B2>=40,”D”,”F”))))
Nested IFs are evaluated left to right. Excel checks the first condition; if it is false, it moves to the next. The order matters: always start from the highest threshold and work down. This nested if formula excel pattern is one of the most tested concepts in data analyst interviews.
Exercise 7: IFS Function (Cleaner Alternative)
Scenario: Rewrite Exercise 6 using the IFS function, which is available in Excel 2019, Microsoft 365 and Google Sheets.
Solution: =IFS(B2>=90,”A”,B2>=75,”B”,B2>=60,”C”,B2>=40,”D”,B2<40,"F")
IFS is much easier to read than deeply nested IF formulas. According to Microsoft’s official documentation, IFS was introduced specifically to reduce formula complexity in multi-condition scenarios. You can read the official syntax at Microsoft Support.
Exercise 8: NOT Function
Scenario: Column B has department names. Flag any employee who is NOT in the “Sales” department as “Other Department”.
Solution: =IF(NOT(B2=”Sales”),”Other Department”,”Sales Team”)
Exercise 9: IF with Multiple Conditions (Excel IF Function with Multiple Conditions)
Scenario: A loan is approved if the applicant’s annual income (column B) is above Rs. 5,00,000 AND their credit score (column C) is above 700, OR if they have an existing relationship with the bank (column D = “Yes”). This mirrors real BFSI sector logic used by Indian banks and NBFCs.
Solution: =IF(OR(AND(B2>500000,C2>700),D2=”Yes”),”Approved”,”Rejected”)
This kind of formula shows up constantly in banking and fintech data work. The key is to plan your logic on paper first, then translate it into Excel. Most errors come from incorrect bracket placement, not from misunderstanding the concept.
Exercise 10: IFERROR with VLOOKUP
Scenario: You are looking up employee IDs in a reference table using VLOOKUP. Some IDs do not exist in the table and return #N/A. Wrap the VLOOKUP in IFERROR to show “Not Found” instead.
Solution: =IFERROR(VLOOKUP(A2,$E$2:$F$100,2,0),”Not Found”)
This excel iferror vlookup combination is one of the most practical excel if function practice exercises you can do because it appears in virtually every professional Excel report. If you want to see how these skills apply to real-world data analytics projects, we have put together a full list worth bookmarking.
Formula List and Solutions
Here is a consolidated reference of all formulas from the exercises above. You can copy this section into a notes document or print it as a quick-reference sheet. This is your working excel if formula list for the exercises on this page.
| Exercise | Formula | Key Concept |
|---|---|---|
| 1 – Pass/Fail | =IF(B2>=40,”Pass”,”Fail”) | Basic IF with comparison operator |
| 2 – Bonus Flag | =IF(B2>100000,”Bonus Eligible”,”Standard”) | IF with numeric threshold |
| 3 – Both Conditions | =IF(AND(B2>=40,C2>=40),”Pass”,”Fail”) | IF + AND |
| 4 – Either Condition | =IF(OR(B2<500,C2>5),”Review”,”Clear”) | IF + OR |
| 5 – Error Handling | =IFERROR(A2/B2,”No Target Set”) | IFERROR for division errors |
| 6 – Nested IF Grades | =IF(B2>=90,”A”,IF(B2>=75,”B”,IF(B2>=60,”C”,IF(B2>=40,”D”,”F”)))) | Nested IF, highest-first logic |
| 7 – IFS Grades | =IFS(B2>=90,”A”,B2>=75,”B”,B2>=60,”C”,B2>=40,”D”,B2<40,"F") | IFS as a cleaner alternative |
| 8 – NOT Function | =IF(NOT(B2=”Sales”),”Other Department”,”Sales Team”) | NOT to reverse a condition |
| 9 – Combined Logic | =IF(OR(AND(B2>500000,C2>700),D2=”Yes”),”Approved”,”Rejected”) | Nested AND inside OR |
| 10 – IFERROR + VLOOKUP | =IFERROR(VLOOKUP(A2,$E$2:$F$100,2,0),”Not Found”) | IFERROR wrapping a lookup |
What Logical Functions Should I Practise Next?
Once you are comfortable with these excel if function practice exercises, the next step is COUNTIF, SUMIF and AVERAGEIF. These apply logical conditions to aggregation, which is where most reporting work actually lives. After those, look at XLOOKUP and array formulas.
Excel skills are consistently listed among the highest paying tech skills for entry-level and mid-level professionals in India. NASSCOM’s 2023 analytics report estimated that over 11 lakh new data and analytics jobs will be created in India by 2026, with spreadsheet proficiency listed as a baseline requirement across almost all of them. Separately, the World Economic Forum’s Future of Jobs 2023 report ranked analytical thinking and data literacy as the top two skills employers globally plan to prioritise through 2027.
How to Check Your Answers
Type the sample data from each exercise into a fresh sheet. Write your formula without looking at the solution. Then compare your output value to the expected result listed in the exercise. If they match, move on. If they do not, check your bracket count first, then your comparison operators.
You can also use Excel’s Evaluate Formula tool (under the Formulas tab) to step through complex nested formulas one condition at a time. This is genuinely one of the most useful debugging tools in Excel and most beginners do not know it exists.
If you are thinking about where these skills lead professionally, reading about the difference between a data analyst vs data scientist will help you map out your path more clearly.
Frequently Asked Questions
Where can I practise Excel IF functions?
You can practise excel if function practice exercises directly on this page. Each of the 10 exercises above includes sample data and a worked solution. Open Excel or Google Sheets alongside this page, type in the data, build the formula yourself, then check the answer below each exercise.
Are there Excel IF formula exercises with solutions?
Yes. This page has 10 exercises with full solutions covering IF, AND, OR, NOT, IFS and IFERROR. Each solution includes the exact formula, a logic explanation and a note on common mistakes. A consolidated formula table appears in the “Formula List and Solutions” section above.
What logical functions should I practise?
Start with IF, then combine it with AND and OR. After that, practise IFS for multi-condition scenarios and IFERROR for error-handling. Once those feel natural, move to COUNTIF and SUMIF. These six functions cover the vast majority of logical formula work in real spreadsheet jobs.
Is there an Excel IF formula list?
Yes, there are two tables on this page. The first lists all six core logical functions with their syntax and purpose. The second covers all 10 exercises with the exact formula used in each one. Both are designed to be printable or copy-pasteable for quick reference.
How do I check my answers?
Compare your formula’s output to the expected result shown in each exercise. For complex formulas, use Excel’s built-in Evaluate Formula tool under the Formulas tab to step through each condition individually. If your result does not match, check bracket placement and comparison operators first as those cause most errors.
You now have everything you need to build real confidence with Excel logical formulas. Work through all 10 excel if function practice exercises in one sitting, then revisit the ones that tripped you up. That repetition is what turns formula knowledge into muscle memory.
- Complete all 10 exercises this week in a real Excel workbook, not just by reading the solutions.
- Explore free online courses with certificates to add formal credentials to the skills you are building.
- If you are serious about a career in data, browse hands-on data analytics projects to build a portfolio employers can actually see.
Excel skills transfer directly into cybersecurity and SOC work, where analysts filter event logs, flag anomalies in spreadsheets and build monitoring dashboards every day. If that direction interests you, 3.0 University offers industry-recognised certifications in Cybersecurity, Ethical Hacking, AI and Blockchain. The EC-Council Certified SOC Analyst course is a strong next step for anyone who wants to apply data skills in a security operations context. You can browse the full catalogue of 3.0 University certification courses to find the path that fits where you want to go.
Last updated: October 2026. Reviewed by the 3University editorial team.