Here is a table of common logical functions in Excel along with brief descriptions and examples:
Function | Description | Example | Result |
---|---|---|---|
AND(logical1, [logical2], ...) | Returns TRUE if all arguments are TRUE | =AND(TRUE, FALSE) | FALSE |
OR(logical1, [logical2], ...) | Returns TRUE if any arguments are TRUE | =OR(TRUE, FALSE) | TRUE |
NOT(logical) | Reverses the logic of its argument | =NOT(FALSE) | TRUE |
IF(logical_test, value_if_true, [value_if_false]) | Returns one value if a condition is true and another value if not | =IF(1+1=2, "Correct", "Wrong") | Correct |
IFERROR(value, value_if_error) | Returns a specified value if the formula evaluates to an error; otherwise, returns the result of the formula | =IFERROR(1/0, "Error") | Error |
IFS(conditions_and_values, ...) | Checks whether one or more conditions are met and returns a value that corresponds to the first TRUE condition | =IFS(1+1=3, "No", 1+1=2, "Yes") | Yes |
SWITCH(expression, value1, result1, [default_or_value2, result2], ...) | Evaluates an expression against a list of values and returns the result corresponding to the first matching value | =SWITCH(3, 1, "One", 2, "Two", "Other") | Other |
XOR(logical1, [logical2], ...) | Returns a logical exclusive OR of all arguments | =XOR(TRUE, TRUE) | FALSE |
These functions are essential for decision making and condition-based operations in Excel spreadsheets.