OR Function Syntax

logical_expression1 – The first condition that you want to check. This could be a cell reference that has the TRUE/FALSE value or an expression that returns logical values.

[logical_expression2].. – Additional conditions that you want to check.

Additional Notes:

OR function can be used with other formulas to be more efficient. For example, if you’re testing two conditions and your final result is ‘Pass’ if any of the two conditions is met. You can use a formula such as =IF(OR(A1=”Pass”,A2=”Pass”),”Pass”,”Fail”).

The arguments must either evaluate to logical values (TRUE/FALSE), or the arguments must be arrays/references of logical values.

Text and empty cells are ignored.

If the specified range contains no logical values, the OR function returns #VALUE! error.

OR Function in Google Sheets – Examples

Now let’s look at some examples where you can use the OR function in Google Sheets.

Example 1 – Test Multiple Conditions Using OR Function

Suppose you have a dataset as shown below and you want to find it any of the tests passed. If any of the tests pass, the formula should return PASS, else it should return FAIL.

The below formula can do this:

=ArrayFormula(IF(OR(B2:B4="Pass"),"Pass","Fail"))

Note that this is an array formula as we are testing multiple cells at one go. You don’t need to write this formula this way. You can simply write the formula =OR(B2:B4=“Pass”) and then use Control + Shift + Enter instead of just using Enter.

In the above formula, OR function evaluates the cells and returns TRUE if any of the tests is a ‘pass’, else it returns a false. If function then uses this result to return “Pass” or “Fail”.

Example 2 – Check Whether a Date is a Weekend Day Or Not

Suppose you have a dataset as shown below:

You can use the OR function along with the WEEKDAY function to check if the day is a weekend or not.

Below formula would return TRUE if it’s a weekend day, else it will return FALSE.

=OR(WEEKDAY(A2,2)=6,WEEKDAY(A2,2)=7)

In this formula, the weekday function returns 6 for a ‘Saturday’ and 7 for a ‘Sunday’. OR function then returns TRUE when the result of WEEKDAY function is 6 or 7.

Example 3 – Using Nested OR function

Suppose you have a dataset as shown below:

In the above case, access is granted only if you are from either Marketing or Sales department or you have the A grade classification.

The below formula will give TRUE if access is to be granted and FALSE if the conditions are not met and access is not to be granted.

=OR(OR(A2="Marketing",A2="Sales"),B2="A")

Note that this is a case of nested OR functions where one OR function is used with in the other.

Sparklines are miniature charts that you can create within a cell. These are quite useful when you’re creating a dashboard and want to quickly show a trend, seasonal increase or decrease, or outliers (maximum/minimum) visually. According

Google Sheets is a great tool when you’re collaborating and working with people on the same sheet. It allows people to work in the sheet simultaneously. In this tutorial, you’ll learn various to insert timestamp in Google

Google Sheets recently added an option to insert a checkbox in a cell. In this tutorial, I will cover everything you need to know about using checkboxes in Google Sheets, along with some useful examples. Click

Google Sheets is a relatively new spreadsheet tool in the market. It has quickly gained a lot of fan following and I see a lot of people migrating from other spreadsheets applications to Google Sheets.