1 Understanding Logical Tests and Boolean Results
A logical test asks Excel a question that has only two possible answers: TRUE or FALSE.
For example, the test =C2>=5000 asks whether the value in C2 is at least 5,000. Excel first evaluates
the condition and then returns TRUE when it is satisfied or FALSE when it is not.
Logical functions become powerful when these Boolean results are converted into meaningful actions. Instead of showing TRUE,
a worksheet can display “Target Achieved,” calculate a bonus, flag an overdue payment, approve a request or select a reporting category.
The quality of the result depends on how clearly the business rule is translated into a formula.
Definition: A logical test is an expression that compares values and returns either TRUE or FALSE.
Common Comparison Operators
Professional Tip: Write the business rule in a plain sentence before writing the formula. Example: “An order is urgent when its due date has passed and its status is not Closed.”
Practical Experiment 1: Test Business Conditions
Create a small sales sheet with Salesperson, Target and Actual Sales columns.
Step 1: Enter DataAdd five salespeople with different target and actual values.
Step 2: TestIn a new column, enter =C2>=B2 and copy it downward.
Step 3: InterpretExplain why each row displays TRUE or FALSE and identify the achieved targets.
Learning Output: You will understand that every logical formula begins with a clearly defined condition.
2 IF Function: Making One Decision
The IF function evaluates one logical test and returns one result when the condition is TRUE and another result when it is FALSE.
It is one of Excel’s most widely used functions because almost every workplace process contains decision rules.
Syntax: =IF(logical_test, value_if_true, value_if_false)
Suppose Actual Sales is in C2 and Target Sales is in B2. The formula
=IF(C2>=B2,"Target Achieved","Target Pending") compares the two values and returns a professional status.
Text results must be enclosed in quotation marks, while numeric calculations are written without quotation marks.
IF Can Return Text, Numbers or Calculations
Remember: A blank string written as "" looks empty but is technically a text result. Use it carefully in later counts and data analysis.
Practical Experiment 2: Automatic Payment Status
Build a simple receivables status formula using due date, payment status and balance.
Step 1: PrepareCreate Customer, Due Date, Balance and Paid? columns.
Step 2: Apply IFUse =IF(D2="Yes","Paid","Follow Up") as the first status rule.
Step 3: ImproveChange the TRUE and FALSE results to match your organization’s preferred wording.
Learning Output: You will create clear operational status messages from raw data.
3 Nested IF: Handling Multiple Outcomes
A nested IF places another IF function inside the TRUE or FALSE part of the first IF. It is useful when a value must be classified
into several ordered categories, such as Excellent, Good, Average and Needs Improvement.
Example: =IF(B2>=90,"Excellent",IF(B2>=75,"Very Good",IF(B2>=60,"Good","Needs Improvement")))
Excel evaluates nested conditions from left to right and stops at the first condition that returns TRUE. Therefore, threshold order is critical.
In a descending grading formula, test the highest mark first. If you test 60 before 90, every score above 60 will stop at the first condition and
higher categories will never be reached.
Designing Nested Logic Safely
1List Outcomes
Write every possible category and its exact rule.
2Arrange Thresholds
Place ranges in a logical ascending or descending order.
3Build Gradually
Test one IF before inserting the next level.
4Test Boundaries
Check values exactly at, just below and just above every threshold.
Audit Tip: Long nested formulas are difficult to review. Use line breaks in the Formula Bar, meaningful named ranges or the IFS function when it improves readability.
Practical Experiment 3: Performance Rating Bands
Create an employee performance rating based on a score from 0 to 100.
Step 1: Define BandsSet 90+ as Outstanding, 75–89 as Strong, 60–74 as Satisfactory and below 60 as Improvement Required.
Step 2: Build FormulaWrite a descending nested IF and copy it to every employee row.
Step 3: Boundary TestTest scores 59, 60, 74, 75, 89 and 90 to confirm correct classification.
Learning Output: You will design and test multi-level decisions without overlapping categories.
4 IFS Function: Cleaner Multi-Condition Classification
The IFS function checks several conditions in sequence and returns the result connected to the first TRUE condition. It removes repeated IF words
and can make a multi-level formula easier to read. It is especially useful for grading, service levels, customer categories and performance bands.
Syntax: =IFS(test1, result1, test2, result2, test3, result3, ...)
Example: =IFS(B2>=90,"Outstanding",B2>=75,"Strong",B2>=60,"Satisfactory",TRUE,"Improvement Required")
The final pair TRUE,"Improvement Required" acts like a default result. Without a matching condition or a final default, IFS returns
#N/A. As with nested IF, the sequence of conditions must reflect the business rule correctly.
Practical Experiment 4: Customer Service Priority
Classify support tickets according to waiting time.
Step 1: Set RulesUse 48+ hours as Critical, 24+ as High, 8+ as Medium and below 8 as Normal.
Step 2: Use IFSWrite one IFS formula in the Priority column.
Step 3: ValidateSort by priority and confirm each ticket follows the intended service rule.
Learning Output: You will create a readable classification formula with a reliable default result.
5 Combining Conditions with AND, OR and NOT
Real decisions often depend on more than one condition. AND, OR and NOT are logical functions that combine or reverse Boolean tests.
They are commonly placed inside IF, IFS, conditional formatting and data validation formulas.
Returns TRUE only when every included condition is TRUE.
Example: =AND(B2>=80,C2="Yes")
Returns TRUE when at least one included condition is TRUE.
Example: =OR(D2="Urgent",E2>5000)
Reverses TRUE to FALSE or FALSE to TRUE.
Example: =NOT(F2="Closed")
Practical Business Formulas
Professional Tip: Use brackets and indentation in the Formula Bar when combining logical functions. Test the AND or OR portion separately before placing it inside IF.
Practical Experiment 5: Incentive Eligibility
Determine whether employees qualify for an incentive using three conditions.
Step 1: Create CriteriaRequire target achievement, attendance of at least 90% and no active warning.
Step 2: Combine LogicUse IF with AND to return Eligible or Not Eligible.
Step 3: ChallengeAdd an OR exception for employees approved by management.
Learning Output: You will translate a multi-condition policy into a transparent decision formula.
6 IFERROR and IFNA: Professional Error Handling
Formula errors are useful diagnostic signals, but they can make customer-facing reports and dashboards look unfinished. IFERROR and IFNA allow you
to return a controlled result when a formula produces an error. The goal is not to hide mistakes blindly; it is to handle expected exceptions while
preserving the ability to investigate unexpected problems.
Handles any standard Excel error, including #DIV/0!, #N/A, #VALUE!, #REF!, #NAME? and #NUM!.
Syntax: =IFERROR(value, value_if_error)
Handles only #N/A, which is helpful when a lookup may legitimately find no matching record.
Syntax: =IFNA(value, value_if_na)
Examples
Avoid this mistake: Do not wrap every formula in IFERROR before checking the original cause. A hidden #REF! may indicate a deleted source column, while a hidden #VALUE! may reveal dirty data that should be corrected.
Practical Experiment 6: Clean Ratio Report
Create a report where some rows contain zero units and missing lookup IDs.
Step 1: Observe ErrorsCalculate Revenue per Unit and note the rows showing #DIV/0!.
Step 2: Handle CarefullyUse IFERROR to return 0 or “Not Available” according to the report requirement.
Step 3: CompareExplain when IFNA is safer than IFERROR for lookup formulas.
Learning Output: You will distinguish expected exceptions from formula defects that require correction.
7 SWITCH Function and Maintainable Decision Models
SWITCH compares one expression with a list of exact values and returns the result connected to the first match. It is useful when a code, department,
status or category has a fixed mapping. Unlike IFS, SWITCH does not naturally test ranges such as “greater than 80”; it is best for exact-match rules.
Syntax: =SWITCH(expression, value1, result1, value2, result2, ..., default_result)
Example: =SWITCH(A2,"N","North","S","South","E","East","W","West","Unknown Region")
Choosing the Right Logical Function
Maintainability Rule: When business rules change frequently, store thresholds and labels in a separate table and use lookup functions instead of editing a very long logical formula repeatedly.
Practical Experiment 7: Convert Department Codes
Translate short department codes into full names.
Step 1: Enter CodesUse HR, FIN, SAL, OPS and ADM in a Department Code column.
Step 2: Apply SWITCHReturn the full department name and add “Unknown Department” as default.
Step 3: Review ScaleDecide when a lookup table would be easier to maintain than a longer SWITCH formula.
Learning Output: You will select the simplest logical tool for each decision pattern.