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.
Introduction
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 have 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.
=OR(C5=”bioethanol”,C5=”biodiesel”,C5=”biobutanol”,C5=”biomethane”,C5=”biohydrogen”)
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 were 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:
=OR(F5=”bioethanol”,F5=”biodiesel”,F5=”biobutanol”,F5=”biomethane”,F5=”biohydrogen”)
13) Upon pressing CTRL-ENTER, a value of TRUE is delivered since one of the conditions were met.
14) Now in cell I8 enter the following formula, in order to see whether Biorefinery Three met one of the specified biofuel outputs:
=OR(I5=”bioethanol”,I5=”biodiesel”,I5=”biobutanol”,I5=”biomethane”,I5=”biohydrogen”)
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:
=OR(C6=”surfactant”,C6=”lubricants”,C6=”fertilizer”,C6=”pharmaceutical products”)
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:
=OR(F6=”surfactant”,F6=”lubricants”,F6=”fertilizer”,F6=”pharmaceutical products”)
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 were met.
20) In order to see whether Biorefinery Three produced any of the value added products needed in cell I9 enter the following formula:
=OR(I6=”surfactant”,I6=”lubricants”,I6=”fertilizer”,I6=”pharmaceutical products”)
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 Area
Download the files that we have used to create this article.
HowToUsetheORFunction
Conclusion
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.
Useful Links
OR Function
The OR Function Explained
Important Biorefinery Concepts
The post How to Use the Excel OR Function appeared first on ExcelDemy.com.