🧠 Goal: Learn how to use the Login to see the code function to apply logic-based conditions in your spreadsheets.
🧩 What is the IF Function?
The Login to see the code function is a logical function that returns one value if a condition is TRUE, and another value if the condition is FALSE.
🔍 Syntax:
=IF(logical_test, value_if_true, value_if_false)
✅ 1. Basic IF Example
Scenario:
You want to check if a number in cell A1 is greater than 50.
Formula:
=IF(A1 > 50, “Pass”, “Fail”)
📌 Explanation:
📊 2. Using Text in IF
Excel can compare text too!
Formula:
=IF(B2 = “Yes”, “Confirmed”, “Pending”)
✔️ This checks if cell B2 contains the word “Yes”.If yes, it returns “Confirmed”, otherwise “Pending”.
🔢 3. IF with Numbers
Formula:
=IF(C2 < 100, “Low”, “High”)
🧮 4. Nested IF Statements
Want to evaluate multiple conditions?
Example: Grade Calculation
=IF(D2>=90, “A”, IF(D2>=75, “B”, IF(D2>=60, “C”, “Fail”)))
Logic:
90 and above → A
75–89 → B
60–74 → C
Below 60 → Fail
⚠️ Be careful — too many nested IFs can become hard to manage.
💡 5. Tips for Working with IF
✅ Wrap text values in double quotes: Login to see the code
✅ For numeric values, no quotes needed
✅ You can combine IF with other functions like Login to see the code, Login to see the code, Login to see the code, etc.
Example**
=IF(AND(A2 > 50, B2 = “Yes”), “Approved”, “Rejected”)**
🧪 Practice Time!
Try the following:
A (Marks) B (Status Formula)
45 Login to see the code
78 Login to see the code
Try changing the values to see how the results change dynamically.
Login to see the link
📌 Summary
🧠 Login to see the code helps you bring logic to Excel — from basic decision-making to dynamic reporting.
It is the foundation of conditional formulas, automation, dashboards, and more!