How to Use the IF Function in Excel (With Real Examples) Excel's IF function is one of the most commonly used logical formulas. It allows you to return specific results based on whether a condition is TRUE or FALSE. 🔹 What is the IF Function? The IF function checks a condition and returns one value if it's TRUE, and another if it's FALSE. 🔹 Syntax: =IF(logical_test, value_if_true, value_if_false) Example: =IF(B2>=40, "Pass", "Fail") 🔹 Example 1: Pass or Fail Based on Marks Assume column B has student scores. You want to return "Pass" if the score is 40 or above, else "Fail". =IF(B2>=40, "Pass", "Fail") 🔹 Example 2: Check for Country If column A has country names, use IF to check if the country is India: =IF(A2="India", "Yes", "No") 🔹 Bonus: Nested IF Example =IF(B2>=75, "Distinction", IF(B2>=40, "Pass", "Fail")) 🔹...