×

Excel OR() Function

The OR() function in excel tests the multiple sets of conditions and returns TRUE if any of the arguments are TRUE and FALSE if all the arguments supplied do not meet the criteria. You need to have a minimum of 2 conditions to check.

Syntax

OR (Logical 1, Logical 2, Logical 3, and soon..)

Parameter

Logical1 (required)- This parameter represents the first condition that needs to be checked.

Logical 2(optional)- This parameter represents the second condition which needs to be checked.

….(optional)- It represents the other conditions, that need to be checked.

Category

Logical

Return

The function returns TRUE value even if one of the conditions holds else returns a FALSE value. Basically, for a FALSE to appear, no conditions should hold.

Example 1

Objective: Test condition 1 and condition 2 to check whether the numbers are greater than 0 or not by using the OR function.

Condition 1 Condition 2 Result Formula
11 23 TRUE  =OR(A20>0,B20>0)
-1 -2 FALSE  =OR(A21>0,B21>0)
-1 2 TRUE  =OR(A22>0,B22>0)

Example 2

Objective: Return TRUE if COL A is greater than COL B and COL B is less than COL C

Col A Col B Col C Result Formula
167 502 61 FALSE =OR(B141>C141,C141<D141)
903 895 967 TRUE =OR(B142>C142,C142<D142)

Example 3

Objective: Using IF and OR function, check whether the student has passed or not. If the student has failed in 1 of the 2 subjects, then the student will be considered as Failed.

Student Name Subject 1 Subject 2 Overall Result Formula
Reeta PASS PASS PASS  =IF(OR(B28="FAIL",C28="FAIL"),"FAIL","PASS")
Sweta PASS FAIL FAIL  =IF(OR(B29="FAIL",C29="FAIL"),"FAIL","PASS")
Baani FAIL PASS FAIL  =IF(OR(B30="FAIL",C30="FAIL"),"FAIL","PASS")
Aditya PASS PASS PASS  =IF(OR(B31="FAIL",C31="FAIL"),"FAIL","PASS")


Related Topics

Excel WORKDAY() Function

Excel WORKDAY() Function The WORKDAY() function in excel returns the serial number of the date before or after a specified number of workdays. Syntax WORKDAY (START_DAY, DAYS, [HOLIDAYS]) Parameter START_DAY (required)- This parameter represents the...

1 minute read.

Nearest Multiple in Excel

In Excel, the values in Multiplication can be round up, down and to nearest Multiplication number using Excel default function. This makes the calculation to be performed in an easier...

3 minutes read.

Excel COUNT() Function

Excel COUNT() Function The COUNT() function counts the number of cells in a range that contain numbers. Syntax COUNT([value1], [value [2], ...) Parameter value1(required)- This parameter represents the first cell in the range. value2, …(optional)- It represents the...

1 minute read.

Excel VALUE() Function

The VALUE() function in excel converts the specific text representing a number (i.e., a number, date, or time format) into a numerical value. Syntax VALUE(Text) Parameter Text(required)- This parameter represents the string that you want...

1 minute read.

Excel Tutorial for Beginners

What is Excel? Microsoft Excel is a software program included in the Microsoft Office suite. It is a commercial spreadsheet application developed by Microsoft for Windows, macOS, Android, and iOS. It...

5 minutes read.

Data Validation in Excel

What is Data Validation? Data Validation is one of the features in Excel that allows user to restrict values which other people can fill in – for example, in a form, you may...

4 minutes read.

Excel IFERROR() Function

The IFERROR() function in excel returns the specified value if initially supplied the argument or formula returns an error, otherwise returns the result of the formula supplied in the first argument. When...

2 minutes read.

What if Analysis Data Table in Excel

What is What-If Analysis? Suppose you have a cell A15 which is formula driven i.e. has a formula and the formula is based on values in different cells (A1, A2, A3, A4), what-if...

4 minutes read.

Shortcut Keys in Excel

Shortcut Keys in Excel Shortcut keys in Excel are used to simplify the work and save time by pressing a few keys.  These keys are used for navigating and working with Excel spreadsheets quickly and easily. Basic Selection:...

9 minutes read.

Gauge Chart in Excel

A Gauge Chart in Microsoft Excel is considered the meter type chart of a group dial chart, which is eventually similar to the speedometer that has the pointer towards the...

7 minutes read.

Adding Column in Excel

Excel spreadsheet is a combination of rows and columns. After creating the table, there is a need to insert additional row or columns. To organize a better worksheet for calculations,...

5 minutes read.

Excel HLOOKUP() Function

Excel HLOOKUP() Function The HLOOKUP() function in excel is used to search a value in the topmost row of a table and then return a corresponding value in the same column for the specified...

2 minutes read.

Excel HOUR() Function

Excel HOUR() Function The HOUR() function in excel converts a serial number to an hour (0 - 23). Syntax HOUR(SERIAL_NUMBER) Parameter SERIAL_NUMBER (required)- This parameter represents the date or time from which you want to extract...

1 minute read.

Division in Excel

Excel worksheet are widely used for calculation purposes. Mathematics calculations include addition, subtraction, multiplication, division etc. Performing this calculation manually takes time and sometimes leads to error. To get the...

5 minutes read.

Operators in Excel

In MS Excel, operators are used to defining the operation you want to perform on the used elements or between variables. There are four types of operators: Arithmetic operators, Comparison...

4 minutes read.

Excel OFFSET () Function

Excel OFFSET () Function The OFFSET() function in excel returns range of cells that is a specified number of rows and columns from an initial specified range. Syntax OFFSET (reference, rows, cols, [height], [width]) Parameter reference(required)-...

2 minutes read.

Excel EOMONTH() Function

Excel EOMONTH() Function The EOMONTH() function in excel returns the serial number of the last day of the month before or after a specified number of months. Syntax EOMONTH (Start_Date, Month) Parameter Start_Date(required)- This parameter...

1 minute read.

Purpose of Randomize in Excel

Excel spreadsheets are used on a large scale for business and personal usage. It is used to store data, perform multiple calculations, make assumptions based on charts and graphs etc....

7 minutes read.

Check Marks in Excel

What is a Check Mark? Among various characters checkmark is one of the characters used to indicate that the item or product in the list is correct, chosen or selected. A...

5 minutes read.

Absolute Value in Excel

What is Absolute Value in Excel? Microsoft Excel worksheet is a combination of numeric values and alphabets. The numeric value is either a positive value or a negative value. Sometimes the...

5 minutes read.