Skip to main content
Version: Streamsheets 3.0

IF

Returns depending on the condition the true or the false argument. Or, if condition evaluates in an error, the function returns the error message and is not calculated.

Syntax

=IF(Condition, TrueValue, FalseValue)

Arguments

NameTypeDescription
ConditionConditionCondition to check.
TrueValueValueOptional value to return, if the condition is true. If not specified nothing is returned.
FalseValueValueOptional value to return, if the condition is false. If not specified nothing is returned.

Return

TypeDescription
BooleanThe appropriate value depending on the condition.

Examples

FormulaResultComment
=IF(3>1, "Warning", "OK")
"Warning"As the condition results to TRUE, the first value is returned.
=IF(A1="no_streamsheets", "Warning", RETURN())
#N with A1 = #NAA1 returns an error and the function will not be calculated