IF in Google Sheets
IF lets a sheet make decisions. It checks a condition and returns one value when it is true and another when it is false: =IF(B2>=60, "Pass", "Fail").
Conditions use comparison operators: =, <> (not equal), >, <, >= and <=. The results can be text (in quotes), numbers or other formulas, for example =IF(C2="Yes", B2*0.1, 0) to pay a 10% bonus only when eligible.
Syntax
=IF(condition, value_if_true, value_if_false)
Example
=IF(B2>=60, "Pass", "Fail")
Labels each score as Pass or Fail.
Common mistakes
- Forgetting quotes around text results.
- Using
=> instead of >=. - Comparing text with different spelling or extra spaces.
← ROUND · AND & OR → · All lessons