Logical functions
All 20 functions in this category
IFThe IF function returns one value if a condition is true and another (or nothing) if it is false, letting you branch logic in a cell.IFSIFS evaluates multiple logical tests in order and returns the first matching value, letting you replace nested IFs with a single readable formula.IFERRORIFERROR returns the result of a formula unless that formula generates an error, in which case it returns a user-specified alternative value.IFNAIFNA returns the result of a formula unless it evaluates to #N/A, in which case it returns a specified alternate value.ANDAND returns TRUE only if every supplied logical argument evaluates to TRUE; otherwise it returns FALSE, making it ideal for multi-condition checks.OROR returns TRUE if any supplied logical expression evaluates to TRUE; otherwise it returns FALSE, handling arrays and single values alike.XORXOR returns TRUE only when an odd number of its logical arguments evaluate to TRUE, otherwise it returns FALSE for the ticket data set.NOTNOT returns the opposite Boolean value of its logical argument, turning TRUE into FALSE and FALSE into TRUE for a single logical input.SWITCHSWITCH evaluates an expression and returns the matching result value, or a default if provided, simplifying multi-branch logic in a single formula.TRUETRUE() returns the logical Boolean value TRUE, a constant that can be used in formulas wherever a true condition is needed.FALSEFALSE returns the logical value FALSE, useful for creating constant false conditions in formulas and logical tests across Excel and Google Sheets.LETLET lets you name a single intermediate result inside a formula, then return that result, making complex calculations clearer and easier to read.LAMBDALAMBDA lets you create custom, reusable functions directly in a cell, returning any value or array based on supplied parameters.BYROWBYROW applies a LAMBDA to each row of a range and returns a vertical array of the results, enabling row-wise calculations in Excel 365 and Google Sheets.BYCOLBYCOL applies a LAMBDA to each column of an array, returning a new array that aggregates or transforms column-wise results.MAPMAP applies a custom LAMBDA to each element of a range, returning a new array of the same shape with the calculated results.REDUCEREDUCE iteratively applies a LAMBDA to each element of an array, carrying forward an accumulator that starts with the initial value.SCANSCAN returns a spill array of accumulated results by applying a custom LAMBDA to each element of an input array, starting from an initial value.MAKEARRAYMAKEARRAY builds a custom-sized array by applying a LAMBDA to each row-column coordinate, letting you compute any value from source data.ISOMITTEDISOMITTED returns TRUE when a LAMBDA argument was left out, otherwise FALSE, letting you supply defaults for optional parameters in Excel 365.