deepcalc
DocsIF

IF

Returns one value if condition is true, another if false.

  • Excel: Verified match
  • Google Sheets: Verified match
  • Returns: Any value

Examples

=IF(A1>100, "High", "Low")
A
1 10
Result Low
=IF(A1>5, B1, 0)
AB
1 102
Result 2

Syntax

IF(condition, value_if_true, [value_if_false])
condition
boolean required
value_if_true
any required
value_if_false
any optional