Excel Agility: Logic Functions - IF, AND, OR, and Beyond

Notice: No webinar is currently available in this series.

This webinar is not currently available, new dates coming soon.

Frequently Asked Questions

The IF function is Excel's foundational logic tool, allowing a cell to return one result when a condition is true and a different result when it is false. Its syntax is =IF(logical_test, value_if_true, value_if_false). For example, =IF(A1>100,"Over Budget","On Track") displays a status message based on whether a value exceeds a threshold. IF functions can be nested within each other to evaluate multiple conditions in sequence—though Excel's IFS function, introduced in newer versions, offers a cleaner alternative for multi-condition logic. The false argument is optional; omitting it returns FALSE when the condition is not met. Common uses include calculating bonuses based on performance thresholds, flagging overdue dates, categorizing expense types, and building approval workflows within spreadsheet models. Mastering the IF function is one of the highest-leverage skills an Excel user can develop, as it underpins a vast range of financial analysis, reporting, and data classification tasks performed daily in business environments.
The AND and OR functions extend the IF function's capabilities by allowing you to evaluate multiple conditions simultaneously. AND returns TRUE only when all conditions are true—useful when an outcome requires several criteria to be met at once. For example, =IF(AND(A1>0,B1>0),"Both Positive","Check Values") requires both cells to be positive before displaying the first message. OR returns TRUE when at least one condition is true—useful for situations where any of several triggers qualifies an outcome. You can nest AND and OR within IF, and even combine them: =IF(AND(A1>0,OR(B1="Yes",C1="Yes")),"Approved","Denied"). These combinations allow complex business rules to be encoded directly in formulas without VBA. Common applications include eligibility checks, multi-condition bonuses, risk classification, and approval logic in financial models. Understanding how to combine these logical operators is essential for Excel users who build dynamic decision-support tools in spreadsheets.
The IFS function, available in Excel 2019 and Microsoft 365, evaluates multiple conditions in order and returns the value corresponding to the first true condition—without requiring the nested IF structure that becomes difficult to read and maintain. Its syntax is =IFS(condition1, value1, condition2, value2, ...) and it can handle up to 127 condition-value pairs. For example, a grade calculator that assigns A, B, C, D, or F based on score ranges is far easier to write with IFS than with four levels of nested IF. IFS is also easier to audit: each condition and its result are paired in sequence, making the logic immediately visible. One important note is that IFS has no built-in else clause—to handle a catch-all default, the last condition is typically set to TRUE. For Excel users still on older versions without IFS, CHOOSE combined with MATCH, or a lookup table approach, can achieve similar readability improvements over deeply nested IF formulas.
IFERROR is a practical Excel function that wraps any formula and returns a custom value if that formula produces an error—such as #N/A, #REF!, #DIV/0!, or #VALUE!—instead of displaying the error code. Its syntax is =IFERROR(formula, value_if_error). For example, =IFERROR(VLOOKUP(A1,table,2,0),"Not Found") returns a clean message instead of an ugly #N/A when a lookup fails. In financial reports shared with non-technical stakeholders, IFERROR is essential for presenting polished, professional output even when source data is incomplete. It is also commonly used in dashboards where formulas reference data that may not yet exist. For cases where you specifically want to catch only #N/A errors—particularly with lookups—IFNA is a more targeted alternative. One caution: wrapping all formulas in IFERROR can mask genuine errors that should be investigated; use it deliberately on formulas where certain error outcomes are expected and acceptable.
The SWITCH function, available in Excel 2019 and Microsoft 365, evaluates a single expression against a list of values and returns the result corresponding to the first match. Its syntax is =SWITCH(expression, value1, result1, value2, result2, ..., default). For example, =SWITCH(A1,"Q1","January-March","Q2","April-June","Unknown Quarter") is far cleaner than an equivalent nested IF or IFS formula. SWITCH is ideal when you need to map a fixed set of codes, categories, or abbreviations to descriptive values—such as department codes to department names, status abbreviations to full labels, or month numbers to quarter names. Unlike IFS, SWITCH compares an expression to exact values rather than evaluating separate conditions, making it faster to write for exact-match scenarios. For range-based conditions (greater than, less than), IFS or nested IF remains more appropriate. Together, SWITCH, IFS, and IF give Excel users a powerful, readable toolkit for encoding business logic directly in worksheet formulas.