The OR function is a logical function to test multiple conditions at the same time. OR returns either TRUE or FALSE. For example, to test A1 for either "x" or "y", use =OR(A1="x",A1="y"). The OR function can be used as the logical test inside the IF function to avoid extra nested IFs, and can be combined with the AND function.
Test multiple conditions with OR
TRUE if any arguments evaluate TRUE; FALSE if not.
=OR (logical1, [logical2], ...)
logical1 - The first condition or logical value to evaluate.
logical2 - [optional] The second condition or logical value to evaluate.
Use the OR function to test multiple conditions at the same time, up to 255 conditions total.
For example, to test if the value in A1 OR the value in B1 is greater than 75, use the following formula:
If you want to do something specific when a cell is NOT this or that (i.e. is NOT equal to X or Y, etc.) you can use the IF function in combination with the NOT and OR functions to run a test, then take one action if...
You can combine logical statements with the OR and AND functions inside the IF function.
If color is red or green and quantity is greater than 10
In the example shown, we simply want to "mark" or "flag" records where...
If you want to use conditional formatting to highlight dates occur on weekends (i.e. Saturday or Sunday), you can use a simple formula based on the WEEKDAY function.
For example, if you have dates in the range C4:C10...
To highlight rows and columns associated with an approximate match, you can use conditional formatting with a formula based on the LOOKUP function together with with a logical function like OR or AND.
In the example...
To highlight intersecting row(s) and column(s) with conditional formatting based on exact matching, you can use a simple formula based on mixed references and the OR function.
In the example shown, the formula used to...
If you want to do something specific when a cell equals this or that (i.e. is equal to X or Y, etc.) you can use the IF function in combination with the OR function to run a test, then take one action if the result is...
Learn Excel formulas and functions with concise, clear videos. Master absolute/relative addresses, dates, text, named ranges, and tools for troubleshooting. Each video comes with a practice worksheet and audio transcript. Instant access and complete 100% guarantee. Start today!