Google Sheets Function: OR

The OR function checks each test and returns TRUE if at least one of the tests is TRUE and FALSE otherwise.

This function is most often used in combination with other functions (notably the IF function).

Usage:

=OR(logical_expression1, logical_expression2, ...)


Using the function alone

The objective here is to check if the member is enrolled in course number 5 on at least one of the two days.

The tests B2=5 and C2=5 are therefore entered as arguments in the OR function:

=OR(B2=5,C2=5)
google sheets function or

Using with another function

The OR function can only return TRUE or FALSE, which is why it is generally used with other functions.

To display "Yes" or "No" instead of TRUE and FALSE, add this function in an IF.

The formula then becomes:

=IF(OR(B2=5,C2=5),"Yes","No")
google sheets function or if
If needed, you can copy the Google Sheets document (or view the document) with this example.