The OR Function is a logical Function, that evaluates two or more conditions and returns true if at least one of the conditions is true. If all of the conditions are found to be false, then the OR Function delivers a value of false.
So, let’s get started with a simple example to illustrate how to use the OR Function.
Read More: Most Useful & Advanced Excel Functions List
In order to make biofuel production economically sustainable, a biorefinery approach has been increasingly focussed on in the renewable energy sphere. A biorefinery produces both biofuel and value-added products from a certain biomass feedstock/crop. Biofuels under consideration have mainly been bioethanol, biodiesel, biobutanol, biomethane, and biohydrogen. Value-added products included outputs such as surfactants, lubricants, fertilizer, and pharmaceutical products. Feedstock such as corn, sugar cane, and waste cooking oil has been tested in a variety of biorefinery models.
A biorefinery is analogous to a petroleum refinery except the petroleum refinery produces fuel and value-added products from the fossil fuel oil. Also, most petrol refineries at this stage are more commercially viable than biorefineries.
A hypothetical inspector is evaluating three different biorefineries. For each biorefinery he has to evaluate whether they have produced at least one of the biofuels mentioned in a viable amount, and then in a separate calculation has to evaluate whether they have produced at least one of the value-added products mentioned above in a viable amount.
The source data is shown below.
1) So, in cell C8, enter the following formula to test whether or not the first biorefinery produced one of the biofuel products needed, in a viable amount. Each of the conditions is separated by a comma.
2) Upon pressing CTRL-ENTER a value of TRUE is delivered since the first biorefinery did produce biobutanol and thus one of the conditions, specified were met.
3) Now with cell C8 selected, go to Formulas>Formula Auditing>Evaluate Formula.
4) The Evaluate Formula Dialog Box will appear and now we can evaluate each condition in our formula.
5) Click on Evaluate twice in order to evaluate whether or not C5 is equal to bioethanol, we get a value of FALSE delivered.
6) We then click on evaluate twice in order to see whether C5, is equal to biodiesel, the next logical condition set and we get a value of FALSE delivered again.
7) We then click on evaluate twice in order to see whether C5, is equal to biobutanol, and in this case we get a value of TRUE delivered.
8) We then click on evaluate twice in order to see whether C5 is equal to biomethane and get FALSE delivered.
9) We then click on evaluate twice in order to see whether C5 is equal to biohydrogen and we get FALSE delivered.
10) We then click Evaluate once more and get TRUE delivered, since one of our logical conditions was met for the OR Function, to give a result of TRUE.
11) We can then click Close.
12) In order to see whether Biorefinery Two has produced one of the listed biofuel outputs enter the following formula in cell F8:
13) Upon pressing CTRL-ENTER, a value of TRUE is delivered since one of the conditions was met.
14) Now in cell I8 enter the following formula, in order to see whether Biorefinery Three met one of the specified biofuel outputs:
15) Upon pressing CTRL-ENTER, a value of FALSE is delivered since Biorefinery Three produced none of the specified biofuel outputs in a viable amount.
16) In order to evaluate whether or not Biorefinery One produced at least one of the specified value-added products listed. We enter the following formula in cell C9:
17) Upon pressing CTRL-ENTER a value of FALSE is delivered since none of the logical conditions were met.
18) In order to see whether Biorefinery Two produced any of the value-added products needed in cell F9:
19) Upon pressing CTRL-ENTER a value of TRUE is delivered since surfactant was produced by the Biorefinery and thus one of the logical conditions was met.
20) In order to see whether Biorefinery Three produced any of the value-added products needed in cell I9 enter the following formula:
21) Upon pressing CTRL-ENTER a value of TRUE is delivered, which means that at least one of the conditions evaluated to TRUE.
And there you have it.
Download the files that we have used to create this article.
The OR Function is a logical function that evaluates to TRUE if at least one of the logical conditions specified are TRUE and FALSE if none of the logical conditions specified evaluate to TRUE. The OR Function can be utilized within an IF Function in order to extend logical functionality greatly as well as with the AND Function.
Please feel free to comment and tell us if you often utilize logical functions in your spreadsheets.