The VLOOKUP Function in Excel
The VLOOKUP function in Excel looks for a value in the first column of a table and gives you back information from another column in the same row.
The OR function in Excel evaluates multiple conditions and returns TRUE if at least one condition is TRUE; otherwise, it returns FALSE.
=OR(logical1, [logical2], …)
If any of the conditions are TRUE, the OR function returns TRUE. It returns FALSE only when all of the conditions supplied are FALSE.
The OR function is often used when you have decision-making scenarios, data validation, and conditional formatting. It also uses logical operators like =, <, >, <=, and >= within the conditions.
A school evaluates students to check if they pass based on the scores they have scored in Math or Science being above 50.
=OR(C3>50,D3>50)
The formula checks if either the Math score or Science score is above 50. As the score of Arjun passes in Science, the result is TRUE and for Priya, both of the criteria don’t meet and the result is FALSE.
A company evaluates attendance records to mark employees who attended on weekends (Saturday and Sunday in this scenario).
=OR(C3="Saturday",C3="Sunday")
The formula checks if the day for each employee is either Saturday or Sunday. Meera’s attendance on Saturday returns TRUE, while Rahul’s attendance on Monday returns FALSE.
A store offers discounts to customers who spend more than $500 or purchase more than 10 items.
=OR(C3>500,D3>10)
The formula checks if the sales amount exceeds $500 or if the customer has purchased items more than 10. Aman qualifies based on the spending and Anjali qualifies based on items purchased. However, Sneha has not met both criteria and the result is FALSE.
A university is providing scholarships if the student’s score is above 90 in Math or 85 in Science.
=OR(C3>90,D3>85)
The formula checks if all three conditions are met. Rohan meets all the conditions passed, so the result is TRUE. However, Augustin scored 85 in Math but not greater than the first logic and the result is FALSE.
An organization approves leave if the reason is either “Medical” or “Emergency”.
=IF(OR(C3="Medical", C3="Emergency"), "Approved", "Not Approved")
The IF function uses OR to check if the reason for leave is either a Medical or Emergency and for Alex leave is approved while for Mia it is not.
A store offers discounts if the customers are members and either spend more than $500 or purchase more than 10 items.
=IF(AND(E3="Yes", OR(C3>500,D3>10)), "Yes", "No")
The OR function evaluates if spending exceeds $500 or if the item purchased exceeds 10, and the AND function ensures the customer is a member. Aman qualifies and the formula returned Eligible and as Anjali does not, it returned blank.
A company marks employees absent if they didn’t attend on either Saturday or Sunday.
=NOT(OR(C3="Saturday",D3="Sunday"))
The OR function checks if the employee attended on either Saturday or Sunday, and the NOT function reverses the result. Vijay is marked as present, while Meera is marked as absent.
The OR function is a powerful tool when you want to evaluate multiple conditions in Excel where either one of the criteria needs to be TRUE. You can check eligibility, decision-making, or also advanced data analysis as it simplifies logical operations.
No comments yet. Be the first to comment!
Press Ctrl+Shift+L to quickly add filters to your data range.