Google Sheets logical functions
Logical functions in Google Sheets, explained with live examples.
13 logical functions in Google Sheets — 13 documented in depth so far, the rest indexed below and landing every week.
Documented logical functions
Syntax, examples, and the equivalent — ready now.
- ANDReturns true if all of the provided arguments are logically true, and false if any of the provided arguments are logically false.LogicalExcel
- FALSEReturns the logical value `FALSE`.LogicalExcel
- IFReturns one value if a logical expression is `TRUE` and another if it is `FALSE`.LogicalExcel
- IFERRORReturns 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.LogicalExcel
- IFNAEvaluates a value. If the value is an #N/A error, returns the specified value. .LogicalExcel
- 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
- NOTReturns the opposite of a logical value - `NOT(TRUE)` returns `FALSE`; `NOT(FALSE)` returns `TRUE`.LogicalExcel
- ORReturns true if any of the provided arguments are logically true, and false if all of the provided arguments are logically false.LogicalExcel
- SWITCHTests 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.LogicalExcel
- TRUEReturns the logical value `TRUE`.LogicalExcel
- XORThe XOR function performs an exclusive or of 2 numbers that returns a 1 if the numbers are different, and a 0 otherwise. .LogicalExcel
More Google Sheets function categories