Skip to main content

📝 Latest Blog Post

How to Use the IF Function in Excel (With Multiple Conditions)

How to Use the IF Function in Excel (With Multiple Conditions)

The IF function in Excel lets you automate decisions by evaluating a condition and returning different results for TRUE or FALSE outcomes.

🔸 1. Basic IF Function

Syntax:

=IF(logical_test, value_if_true, value_if_false)

Example: =IF(A2>=40, "Pass", "Fail") – This checks if a student scored 40 or more.

🔸 2. Nested IF Function

Use Case: Grade students based on score


=IF(A2>=90, "A",
IF(A2>=75, "B",
IF(A2>=60, "C",
"Fail")))

🔸 3. IF with AND / OR

Example: Check if score is between 60 and 80

=IF(AND(A2>=60, A2<=80), "Average", "Other")

Example: Check if a student passed any subject

=IF(OR(B2>=40, C2>=40), "Passed", "Failed")

✅ Practical Use Cases

  • Mark attendance as Present/Absent
  • Set discounts based on purchase amount
  • Trigger warning messages or notes

💡 Want to keep mastering Excel logic? Follow ScriptDataInsights for more powerful examples every day!

Comments

🔗 Related Blog Post

🌟 Popular Blog Post