ExcelCSE.com

Menu
  • Excel 101
  • Excel Functions
  • Excel Formula
  • Contact Us
How to Use Excel > Excel Functions > Excel OR Function

Excel OR Function

How to Use the Excel OR Function
Table of contents :
  • What is the Excel OR Function?
  • OR Syntax
  • How to Use OR Function in Excel
  • OR Example, Have You No Ideal Weight?
  • Another OR Function Alternative
  • An Example for OR Function Replacement

How to Use OR Function in Excel

What is the Excel OR Function?

Excel OR function used to determine a condition. If met ANY of the conditions returns TRUE. If not met ALL conditions return FALSE.

OR Syntax

OR(logical1, [logical2], ...)

logical1, required, evaluate the first condition

logical2, optional, up to a maximum of 255 conditions

Excel ignore any argument contains text or empty cells. OR function returns the #VALUE! Error if any argument contains no logical values.

How to Use OR Function in Excel

OR function with two conditions

The following is an example of using an OR function with two conditions to be evaluated.

Excel OR Function

The result is as shown below

Excel OR

The OR function returns TRUE if there is a TRUE condition, either one or all.

OR function with three conditions

The following is an example of using an OR function with three conditions to be evaluated.

OR Statement in Excel

The result is as shown below

OR Formula in Excel

From the picture above, OR function returns TRUE if there is only 1 logical value TRUE. Returns FALSE if all conditions are FALSE.

OR Example, Have You No Ideal Weight?

For example, there are data such as the image below

OR Function

Which of the twelve names above have no ideal weight? The BMI value (body mass index) determine the criteria. You can calculate The BMI value by dividing the weight (in KG) by the height (in Meter2).

According to BMI, the ideal weight criteria is greater than or equal to 18.5 and smaller or equal to 24.9. The BMI value for not perfect weight is the opposite, i.e., less than 18.5 OR more than 24.9.

There are two conditions to be evaluated. Condition #1 BMI<18.5 and condition #2 BMI>24.9. If met ANY of the conditions then returns TRUE (Not ideal weight). So, use OR function to evaluate the conditions.

Here are the steps on how to use OR function.

  • Place the cursor in cell E2
  • Type the OR formula
  • Fill the first argument logical1 with condition #1, D2<18.5
  • Fill the second argument logical2 with condition #2, D2>24.9
  • Press the ENTER key

If completely typed, the formula will look like below.

=OR(D2<18.5,D2>24.9)

Do a copy in cell E2 then paste in range E3:E13. The result is as shown below.

Excel OR Operator

There are ten names have no ideal weight (under or over). All of them met one of two conditions.

The result of OR function is not informative, because it only displays TRUE/FALSE value. Want more informative result? Use Excel IF Statement.

  • How to Use IF Function in Excel
Read “How to use AND Function” for same data but different question.

Another OR Function Alternative

Due to the unique characteristic of TRUE/FALSE logical value, you can use simple addition formula as OR function replacement. TRUE converted to number 1 and FALSE to number 0 if involved in mathematical operations.

The logical OR function will be TRUE if at least one condition is TRUE. The total value of addition formula at least 1, indicating there is a TRUE value.

Addition formula as OR function replacement with two conditions

Suppose there is data like the image below. Can you use the addition formula as OR function replacement?

How to Use OR in Excel

The result is as shown below

Using OR in Excel

The OR function and the addition formula have the same results.

Addition formula as OR function replacement with three conditions

If there are three conditions, can you use the addition formula instead of the OR function?

OR Condition in Excel

The result is as shown below

OR Formula

The addition formula and OR function results still the same.

An Example for OR Function Replacement, Have You No Ideal Weight?

Suppose there is data such as the picture below, the same study case with the previous. Can you use the addition formula instead of the OR function to find anyone who had not ideal weight?

According to BMI, not ideal weight is less than 18.5 OR more than 24.9.

How to Use OR Function

There are two conditions; both do not have to be TRUE. The addition formula is used to add the condition #1 (checks whether BMI is less than 18.5) and condition #2 (checks whether BMI is more than 24.9).

Here are the steps to use the addition formula as OR function replacement.

  • Place the cursor in cell F2
  • Type an equal sign “=”
  • Condition #1 is to check whether cell D2<18.5
  • Type + (plus) sign for the addition formula
  • Condition #2 is to check whether cell D2> 24.9
  • Check whether the total of condition #1 and condition #2 is greater than or equal to 1
  • Press the ENTER key

If completely typed, the formula will look like below.

=(D2<18.5)+(D2>24.9)>=1

Do a copy in cell F2 then do a paste in range F3:F13. The result is as shown below.

How to Use OR Function in Excel

The results are same as OR functions.

Another article using or explain about OR Function
  • SUMPRODUCT IF – Multiple Criteria SUMPRODUCT
  • SUMIF Multiple Criteria
  • SUMIFS Limitations and Solutions

Another Logical Function

Another article about Logical Function
  • Excel IFNA Function
  • Excel AVERAGEIFS Function
  • Excel AVERAGEIF Function
  • Excel IFERROR Function
  • Excel SUMIFS Function
  • Excel SUMIF Function
  • Excel IFS Function
  • Excel IF Statement
  • Excel AND Function
  • Excel OR Function
Usefull links
  • Microsoft OR function documentation
Share
Tweet
Google+
Email
Prev Article
Next Article

Related Articles

Excel MID Function
What is the Excel MID Function? The excel MID function …

Excel MID Function

Excel IFNA Function
What is the Excel IFNA Function? The Excel IFNA function …

Excel IFNA Function

Excel VALUE Function
What is the Excel VALUE Function? The Excel VALUE function …

Excel VALUE Function

Excel TRIM Function
What is the Excel TRIM Function? The excel TRIM function …

Excel TRIM Function

Excel CONCAT Function
What is the Excel CONCAT Function? The excel CONCAT function …

Excel CONCAT Function

Tags:Addition Formula Excel OR Excel OR Operator How to Use OR Function How to Use OR Function in Excel How to Use OR in Excel Logical Function OR Condition in Excel OR Formula OR Formula in Excel OR Statement in Excel Using OR in Excel

Categories

  • Excel 101
  • Excel Formula
  • Excel Functions

Recent Posts

  • Get the Original Price from Percentage Increase/Decrease
  • How to Add/Subtract Percentage in Excel
  • How to Extract Day, Month and Year from Date in Excel
  • How to Add Seconds, Minutes and Hours to a Time in Excel
  • How to Add Days, Weeks, Months and Years to a Date in Excel
  • How to Calculate Time Difference in Excel
  • Calculate Number of Days, Weeks, Months and Years Between Two Dates in Excel
  • Flash Fill Excel
  • Paste Special Excel
  • Excel TEXTJOIN Function
  • Excel CONCAT Function
  • Excel CONCATENATE Function
  • Excel REPLACE Function
  • Excel SUBSTITUTE Function
  • Excel REPT Function
  • Excel FIND Function
  • Excel SEARCH Function
  • Excel MID Function
  • Excel RIGHT Function
  • Excel LEFT Function

ExcelCSE.com

The Ultimate Guide How to Use Excel Better
Copyright © 2024 ExcelCSE.com
Contact Us - Privacy Policy - Sitemap | Theme by MyThemeShop.com

Ad Blocker Detected

Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Refresh