Google Sheets logical functions
Logical functions in Google Sheets, explained with live examples.
13 logical functions in Google Sheets — 3 documented in depth so far, the rest indexed below and landing every week.
Documented logical functions
Syntax, examples, and the equivalent — ready now.
- IFSEvaluates multiple conditions and returns a value that corresponds to the first true condition.LogicalExcel
- LAMBDACreates and returns 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.LogicalExcel
- LETAssigns name with the value_expression results and returns the result of the formula_expression. The formula_expression can use the names defined in the scope of the LET function. The value_expressions are evaluated only once in the LET function even if the following value_expressions or the formula_expression use them multiple times.LogicalExcel
All Google Sheets logical functions
The full set — deep dives on the way.
- AND
- Returns true if all of the provided arguments are logically true, and false if any of the provided arguments are logically false.
- FALSE
- Returns the logical value `FALSE`.
- IF
- Returns one value if a logical expression is `TRUE` and another if it is `FALSE`.
- IFERROR
- Returns the first argument if it is not an error value, otherwise returns the second argument if present, or a blank if the second argument is absent.
- IFNA
- Evaluates a value. If the value is an #N/A error, returns the specified value. .
- NOT
- Returns the opposite of a logical value - `NOT(TRUE)` returns `FALSE`; `NOT(FALSE)` returns `TRUE`.
- OR
- Returns true if any of the provided arguments are logically true, and false if all of the provided arguments are logically false.
- SWITCH
- 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.
- TRUE
- Returns the logical value `TRUE`.
- XOR
- The XOR function performs an exclusive or of 2 numbers that returns a 1 if the numbers are different, and a 0 otherwise. .
More Google Sheets function categories