How to Use the OR Function in Excel

The OR function allows you to test whether at least one condition is true in Excel. It’s useful when you want to flag records that meet any of several criteria. In this lesson, you’ll see how the OR function can help HVAC businesses identify systems that need attention, such as equipment that is older than a certain number of years or has gone too long without service, making it easier to prioritize customer outreach.

Download the Excel file used in this tutorial:

Using the OR Function in Excel

1. Create a flag column for customer outreach

  • Add a new column to your dataset that will identify systems that need attention.
  • Name this column something like Customer Outreach Flag so it clearly shows which records require follow-up.

2. Identify the conditions you want to test

  • Decide which criteria should trigger outreach.
  • In the example from the video, two conditions are used:
    • Equipment age greater than a certain number of years.
    • Time since last service greater than a certain number of months.

The goal is to flag equipment when either condition is true.

3. Test multiple conditions with the OR function

  • Use the OR function to evaluate the two criteria.
  • The OR function checks whether at least one condition is true.
  • If either the equipment age threshold or the service interval threshold is met, the result will return TRUE.

4. Fill the logic down the dataset

  • Copy the OR logic down the column for all records.
  • Each row will now return either TRUE or FALSE depending on whether one of the conditions is satisfied.

5. Convert TRUE/FALSE results into a clearer flag

  • Wrap the OR function inside an IF function to make the results easier to read.
  • Instead of returning TRUE or FALSE, the output can display:
    • Yes when the conditions indicate outreach is needed
    • No when neither condition is met

6. Optionally return blanks instead of “No”

  • For cleaner dashboards or reports, you can adjust the IF function so that:
    • Yes appears for rows requiring action
    • All other rows return a blank cell

This makes it easier to scan the column and immediately see which customers should be contacted.

7. Use the flag to identify outreach opportunities

  • Once the logic is applied across the dataset, filter or sort the column to see all rows marked Yes.
  • These rows represent systems that either:
    • Are older than the defined threshold, or
    • Have gone longer than the acceptable service interval.

8. Extend the OR logic with additional conditions

  • The OR function can evaluate more than two criteria if needed.
  • For example, you could add conditions such as:
    • Systems above a certain repair cost
    • Equipment nearing warranty expiration
    • Service intervals exceeding a defined threshold

By combining OR with IF, you can build flexible outreach flags that automatically identify equipment needing attention.

The OR Function in Excel

Q1. What does the OR function do in Excel?
The OR function checks multiple conditions and returns TRUE if at least one condition is met. If none of the conditions are true, the function returns FALSE.

Q2. When should I use the OR function?
Use the OR function when you want to flag or identify records that meet any of several criteria. For example, you might want to identify equipment that is either too old or hasn’t been serviced recently.

Q3. How is the OR function different from the AND function?
The OR function returns TRUE if any condition is true, while the AND function only returns TRUE when all conditions are true. OR is useful for broader filtering, while AND is used when all criteria must be satisfied.

Q4. Can the OR function be combined with other Excel functions?
Yes. The OR function is often combined with the IF function to create more readable outputs. For example, instead of returning TRUE or FALSE, you can return results such as “Yes” or leave the cell blank.

Q5. What types of conditions can the OR function evaluate?
The OR function can evaluate many types of conditions including numeric thresholds, dates, text comparisons, or logical tests. This makes it useful for identifying exceptions, highlighting records that need attention, or triggering alerts.

Q6. Why is the OR function useful for operational analysis?
In real business data, decisions often depend on multiple possible triggers. The OR function helps analysts identify records that meet at least one risk condition, making it easier to prioritize actions and monitor operational performance.

Get more lessons like this
by joining our newsletter

Receive weekly Excel tutorials, tips, and KPIs straight to your inbox

Databoards

Analysis & Development