Excel functions

Logical functions

Logical functions let a formula choose. IF and IFS return different results depending on a test, AND, OR, NOT and XOR combine tests, IFERROR catches mistakes, and the newer LET, LAMBDA, MAP, REDUCE and SCAN turn formulas into small reusable programs.

Start with these

ANDReturns TRUE only when every condition you give it is TRUE, and FALSE as soon as any one of them is FALSE.IFTests a condition and returns one value when it is TRUE and another when it is FALSE. The basis of almost every decision formula in Excel.IFERRORReturns a value you choose when a formula results in an error, and the formula's normal result otherwise. Ideal for tidying #DIV/0! and #N/A.IFSChecks several conditions in order and returns the value for the first one that is TRUE. A cleaner alternative to nested IF formulas.LAMBDACreates your own reusable function from an Excel formula, with named parameters. Save it in Name Manager to call it like a built-in function.LETGives names to values or calculations inside one formula, so long formulas are easier to read and repeated parts are calculated only once.NOTReverses a logical value: TRUE becomes FALSE and FALSE becomes TRUE. Useful for "is not" conditions and excluding cases.ORReturns TRUE if at least one of the conditions is TRUE, and FALSE only when all of them are FALSE.SWITCHCompares one value against a list of options and returns the result paired with the first exact match, with an optional default.

All 19 logical functions

Other categories

Lookup & referenceTextDate & timeMath & trigStatisticalFinancialInformationDatabaseEngineeringCompatibilityWebCubeAI & Python