Home / Formula Types / Logical

What is a LOGICAL formula in a spreadsheet?

Logical formulas and functions evaluate logical conditions and return logical results (TRUE or FALSE). They enable you to perform logical comparisons, logical operations (AND, OR, NOT), and build conditional expressions for decision-making or data filtering purposes.

LOGICAL formula usage examples.

The AND function returns true if all of the provided arguments are logically true, and false if any of the provided arguments are logically false. It can be used to perform logical operations on multiple expressions.

The FALSE function in Excel returns the logical value FALSE. It is often used in conjunction with other functions to perform logical operations and comparisons.

The IF function in Excel is used to return one value if a logical expression is TRUE and another value if it is FALSE. It allows for conditional evaluations and is commonly used for decision-making in formulas.

The IFERROR function checks if the first argument is an error value. If it is not an error, it returns the first argument. If the first argument is an error, it checks if the second argument is present. If the second argument is present, it returns the second argument. If the second argument is absent, it returns a blank value.

The IFS function evaluates multiple conditions and returns a value that corresponds to the first true condition. It can be used as an alternative to nested IF statements, making the formula more concise and easier to read. Each condition is followed by a value, and the function checks each condition in order until it finds a true condition. If none of the conditions are true, the function returns an optional default value.

The LAMBDA function in Excel allows you to create and return a custom function with a set of names and a formula_expression that uses them. To calculate the formula_expression, you can call the returned function with as many values as the name declares.

The LET function assigns names to values and allows the use of those names in subsequent calculations. It is useful for simplifying complex formulas and improving readability.

The NOT function returns the opposite of a logical value. If the logical expression is TRUE, the function returns FALSE, and if the logical expression is FALSE, the function returns TRUE.

The OR function returns true if any of the provided arguments are logically true, and false if all of the provided arguments are logically false. It can be used to evaluate multiple logical expressions and determine if at least one of them is true.

The SWITCH function tests an expression against a list of cases and returns the corresponding value of the first matching case, with an optional default value if nothing else is met. It allows for multiple cases and values to be specified, and the default value is optional.

The TRUE function in Excel returns the logical value TRUE. It is often used in combination with other functions to evaluate conditions and return TRUE or FALSE based on the result.

The XOR function performs an exclusive OR operation on one or more logical expressions. It returns 1 if the expressions are different, and 0 if they are the same.