Reference
No results for 'undefined'
    Powered by Algolia

    IF

    Returns one value if a logical expression is TRUE and another if it is FALSE.

    Syntax

    =IF(logicalExpression, valueIfTrue, [valueIfFalse])

    Parameters

    1. logicalExpression
      • Type: Boolean
      • Description: An expression or reference to a cell containing an expression that represents some logical value, i.e. TRUE or FALSE.
    2. valueIfTrue
      • Type: Formula Expression
      • Description: The value the function returns if logicalExpression is TRUE.
    3. valueIfFalse [optional]
      • Type: Formula Expression
      • Description: The value the function returns if logicalExpression is FALSE. If omitted, FALSE will be returned if expression is FALSE

    Returns

    • Type: Any
    • Description: Returns value

    Example

    =IF(A2 = "foo", "A2 is foo", "A2 is not foo")
    Contents