OR() Function Example 1

View an example of the OR function used to compare poverty levels in two cities with the US level of poverty.

Illustration of the OR function used to compare poverty levels in two cities with the US level.
Transcript(click to view)
Suzanne Here. Welcome to Excel Intuition’s OR() Function Example 1 Video.

We’ll introduce the OR() Function by looking at the Some Logical Functions worksheet. And if you haven’t already done so, I recommend you download your own copy of this workbook, so you can examine the data we’re using for our examples, and you can try things on your own, and there’s a lot of opportunities to learn from the workbook. So the OR() Function is structured exactly the way the AND() Function is, except it’s spelled “O,” “R,” for “OR”. There are logical test arguments inside parentheses, and you can have up to 255 logical tests inside of an OR() Function. And the OR() Function will result in TRUE if ANY ONE of the logical test arguments evaluates to TRUE. If ALL of them evaluate to FALSE, then the OR() Function will result in a FALSE outcome. So let’s look at our AND() OR() Example worksheet. In this case we’ve got data from the U.S census from 2021 that reports the Percents of Persons in Poverty in various communities, and also the Percent of Persons in Poverty in the U.S as a whole. In this case we’ve got two different Monterey County cities represented, but you could choose different cities from the drop down lists if you want to look at that in your own workbook. And the two columns we have illustrating the OR() function, we’re asking the question, we’re saying: “At least one of the cities has a lower percent than the US.” And then we’re saying “At least one city has a higher percent than the U.S.” And let’s look at how this is constructed.

We’ve got our OR() Function, and we’re saying the value in B8, the city in column B, is less than the value for the US in F5, or the value in C8

is less than the value in F5.

If either of those is TRUE, then the OR() function will result in TRUE. Notice, it results in FALSE, because neither of those is less than the value for the U.S. as a whole. In this case we’re asking, at least one city has a HIGHER percent than the U.S., and we’re saying,

now our tests are the opposite: B8 is greater than F5, or C8 is greater than F5. And in this case we know they’re both greater, so that, that OR() function results in TRUE.

If we wanted to have a,

let’s say we take a city, the city of Pacific Grove, has a lower value for Persons in Poverty Percent than the U.S., then our first OR() Function will end up with a TRUE result, because ONE of those cities has a value that’s less than the U.S. Thank you.