Skip to content

IF

Logical

IF helps you perform conditional and boolean logic helpers for branching worksheet behavior.

Overview

Start with "=" then enter IF(condition, value_if_true, [value_if_false]). Keep argument order as shown and use cell ranges where appropriate.

Parser pathComplete docs

Syntax & Arity

=IF(condition, value_if_true, [value_if_false])

2 to 3 arguments

Arguments

ArgumentRequiredTypeDescription
conditionRequiredSingleInput argument used by this function.
value_if_trueRequiredSingleInput argument used by this function.
value_if_falseOptionalSingleOptional argument for advanced control.

Example Inputs & Outputs

Formula

=IF(A1>0,"Pass","Fail")

Example Output

Pass

Returns one value if the condition is true and another if false.

Related Functions