Excel IF Function
Chala mitrano — today IF. Ask a yes/no question; Excel picks answer A or answer B.
चला मित्रांनो — आज IF. हो/नाही प्रश्न विचारा; Excel उत्तर A किंवा B निवडते.
चलो दोस्तों — आज IF. हाँ/नहीं सवाल पूछो; Excel जवाब A या B चुनता है.
Purpose
Return one value if a test is TRUE, another if FALSE.
Return value
The value_if_true or value_if_false you supply.
Syntax
Arguments
| Argument | Required? | Description |
|---|---|---|
logical_test | Required | A test that is TRUE or FALSE (example B2>=35). |
value_if_true | Required | Result when the test passes. |
value_if_false | Optional | Result when it fails (blank if omitted). |
Version
All Excel versions. LibreOffice Calc and Google Sheets too.
How to use — Why → What → How
Why: Reports need Pass/Fail, Due/OK, High/Low — not a human scanning every row. Pass/fail marks in Nashik coaching + Chicago online tests. Mixed ₹ and $ fees. In Indian back offices and foreign sister teams, IF shows up on approval, SLA and fee sheets every week.
What: IF runs logical_test. If TRUE it returns value_if_true; else value_if_false. Read every argument in the table once before you type; each one changes the answer on purpose.
How — numbered steps:
- Type =IF(B2>=35,"Pass","Fail").
- Fill down.
- Nest carefully or prefer IFS for many branches.
Ravindra Bagale's Tip
Friends, after IF, find one IF/logic cell in a real workbook this week that this lesson improves.
Ravindra Bagale's Tip – मराठी
मित्रांनो, IF नंतर या आठवड्यात खरी workbook मधील एक logic cell सुधारा.
Ravindra Bagale's Tip – हिंदी
दोस्तों, IF के बाद इस हफ़्ते असली workbook की एक logic cell सुधारो.
Ravindra Bagale's Tip
Friends, sleep on IF; rebuild example 1 tomorrow without looking.
Ravindra Bagale's Tip – मराठी
मित्रांनो, IF वर झोपा; उद्या उदाहरण 1 न पाहता लिहा.
Ravindra Bagale's Tip – हिंदी
दोस्तों, IF पर सोकर कल उदाहरण 1 बिना देखे लिखो.
Ravindra Bagale's Tip
Friends, say the business rule in plain words before =IF.
Ravindra Bagale's Tip – मराठी
मित्रांनो, =IF आधी नियम साध्या शब्दांत सांगा.
Ravindra Bagale's Tip – हिंदी
दोस्तों, =IF से पहले नियम सादे शब्दों में बोलो.
Ravindra Bagale's Tip
Friends, after you finish IF, open yesterday’s real workbook and find one place this function would have saved ten minutes.
Ravindra Bagale's Tip – मराठी
मित्रांनो, IF नंतर कालची खरी वर्कबुक उघडा आणि शोधा जिथे हे फंक्शन दहा मिनिटे वाचवू शकले असते.
Ravindra Bagale's Tip – हिंदी
दोस्तों, IF के बाद कल की असली वर्कबुक खोलो और ढूँढो जहाँ यह फ़ंक्शन दस मिनट बचा सकता था.
Ravindra Bagale's Tip
Friends, treat IF like a seatbelt on logic columns — use it before a manager asks why the flag is wrong.
Ravindra Bagale's Tip – मराठी
मित्रांनो, IF ला logic columns वरील seatbelt समजा.
Ravindra Bagale's Tip – हिंदी
दोस्तों, IF को logic columns पर seatbelt समझो.
Download practice file: practice-if.xlsx (includes sheet About this data, practice sheets, and Answers).
Worked examples
1) Pass mark
Nashik test.
| Name | Score |
|---|---|
| Neha Shah | 42 |
| Amit Patil | 28 |
Result: Pass
What it means: 42 ≥ 35 → Pass (row2 would Fail).
2) Fee due
Chicago $.
| Paid | Fee $ |
|---|---|
| No | 120 |
Result: Due
What it means: Text test with quotes.
3) Bonus ₹
Sales.
| Sales ₹ |
|---|
| 85000 |
Result: 5000
What it means: Numeric threshold.
4) Nested band
Grade.
| Score |
|---|
| 78 |
Result: A
What it means: Nested IF — consider IFS.
5) Blank safe
Empty score.
| Score |
|---|
Result: Enter score
What it means: Guard blanks first.
6) AND inside IF
Both city and status.
| City | Status | ₹ |
|---|---|---|
| Pune | Open | 900 |
Result: Review
What it means: Combine tests with AND.
Common errors and fixes
Notes and tips
- Revisit IF errors after the quiz.
- Build one example from memory.
- Check types if results look wrong.
- Teach a tip in Marathi or Hindi.
- Keep currency consistent in one column (practice mixes ₹ $ £ €).
- Drill: build Pass/Fail and Due flags on a mixed Pune/Chicago sheet from memory.
- IF vs IFS: one test vs many sequential tests.
- Fictional sample data only.
- Print the IF revision card.
- Ask juniors to predict before Enter.
- Track your top mistake monthly.
- Pass/fail marks in Nashik coaching + Chicago online tests. Mixed ₹ and $ fees.
- Logical tests love TRIM and UPPER when text is messy.
- Interview tip: explain the business rule before the formula.
- When nesting, keep each IF on its own mental line — or switch to IFS/SWITCH.
- Classroom drill: invent three brand-new formulas from your city without the page open.
- Share one tip with a classmate — teaching locks the idea.
- If a result looks wrong, check blanks vs zeros before rewriting logic.
- Print the revision card for IF for one week of real worksheets.
- When helping a junior, ask them to predict before Enter.
- Share one tip with a classmate in Marathi or Hindi.
- Keep currency symbols consistent inside a single report column.
- When Excel versions differ, write a nested-IF fallback under IFS/SWITCH in a comment.
- Logical tests love TRIM and UPPER when text is messy.
- Interview tip: explain the business rule before the formula.
In real work
Drill: build Pass/Fail and Due flags on a mixed Pune/Chicago sheet from memory. Pass/fail marks in Nashik coaching + Chicago online tests. Mixed ₹ and $ fees. Classroom drill: write three brand-new IF formulas on a blank sheet using names from your own city — if you can invent them without the page open, you own the skill. Then break one formula on purpose and watch the error; recovering from that break is half of interview readiness. Always verify with a known case before trusting a long chain of logical tests. Keep a personal notebook of the one mistake you make most often with this function; review it monthly.
How it compares
IF vs IFS: one test vs many sequential tests.
Interview corner
- IF vs IFS?
- Two-way vs many tests.
- Text tests?
- Quotes + TRIM.
- Nesting limit pain?
- Move to IFS.
Related functions
Practice tasks (10)
- Task 1. Pass/Fail on score ≥35.IF.
- Task 2. Due if Paid=No.Text.
- Task 3. Bonus if sales≥80000.Number.
- Task 4. Nested A/B/C.Nest.
- Task 5. Blank message.Guard.
- Task 6. AND inside IF.AND.
- Task 7. Explain vs IFS.Interview.
- Task 8. TRIM before text test.Spaces.
- Task 9. Fill down 10 rows.Fill.
- Task 10. Bonus: IFERROR wrap later.Related.
Quick quiz
Answers: Q1=A logical test, Q2=Quotes, Q3=IFS, Q4=IF(A2="","…",…), Q5=Your chosen values (check after you try).
Revision card
Standalone card (no tip or photo strip). QR opens this lesson. Download the PNG and revise offline.