EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Certification Courses
  • 120+ Courses All in One Bundle
  • Login

OR Excel Function

By Madhuri ThakurMadhuri Thakur

Home » Excel » Blog » Logical Functions in Excel Tutorial » OR Excel Function

or in excel

OR Excel Function (Table of Contents)

  • OR in Excel
  • OR Formula in Excel
  • How to use OR Function?

OR in Excel

OR Function is a logical function which compares two values or statements in a defined cell. OR function helps in testing the conditions defined or given.

Start Your Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

The result of the OR Function will either TRUE or FALSE, as per the condition. It will result in TRUE if any of the condition or argument evaluates match the given condition. If the condition does not match then, it will return as a FALSE.

OR Formula in Excel

Below is the OR Formula:

OR Formula in Excel

What OR Function actually does?

It returns TRUE if any argument matches or true; it returns FALSE if all arguments are false.

When to use OR Function?

OR Function can be used when we want to check multiple conditions in a defined cell.

Arguments:

  • Logical1 – the condition which we want to evaluate, it can be TRUE or FALSE (first condition)
  • Logical2 – This condition is the optional, second condition which we want to evaluate for TRUE or FALSE.

How to Open OR Function in Excel?

Click on Formula Tab > Logical> Click on OR

or function steps

How to Use OR Function in Excel?

This OR Function is very simple and easy to use. Let us now see how to use OR in Excel with the help of some examples.

You can download this OR function Excel Template here – OR function Excel Template
  • We can manually enter by using the Formula dialogue box and enter the required logical values or conditions according to the requirement in the spreadsheet.

Example #1

After clicking OR, we can enter the logic in the below box, make sure the logic should be in a correct format and written between” ” so that it can return to a correct result like below.

Popular Course in this category
Sale
Excel Advanced Training (16 Courses, 23+ Projects)16 Online Courses | 23 Hands-on Projects | 140+ Hours | Verifiable Certificate of Completion | Lifetime Access
4.8 (11,434 ratings)
Course Price

View Course

Related Courses
Excel Data Analysis Training (16 Courses, 8+ Projects)Excel for Marketing Training (8 Courses, 13+ Projects)

OR Function in Excel Example 1-1

We can see it returned as FALSE because, as entered in logic, A2 is neither Orange nor Red, so the result is FALSE.

OR Function in Excel Example 1-2

  • The other option is to enter the OR formula in the required cell with correct syntax to return a value according to the argument.

Example #2

As we can see in the below example that the argument came as TRUE because the logic which is given below formula that A2 is greater than 50, but it does not match; however, the other logic is A2 is greater than 10; hence it came as TRUE because if any of the logic is correct or match then, it will come as TRUE.

OR Function in Excel Example 2

Example #3

We can also use OR with the IF function, suppose marks of students are given for English and Science if English marks are above 50 and Science is above 48, then we want to be considered as a pass for the given students.

As we can see in the below screenshot, Roll no. 102 & 106 has less no. in both subjects as per the argument or condition, which is why they are considered FAIL. Roll no. 102 have 26 marks in English & 20 marks in Science and required is 50 & 48, respectively, hence the result is FAIL. Same with Roll no. 106.

OR Function in Excel Example 3

Example #4

Sometimes, we have to highlight or know the weekends’ dates, depending on the requirement. In this case, we can use the OR and WEEKDAY functions. For example, we can take the data given below:

or example 4-1

The below formula used the WEEKDAY function firstly to test for the entire days, whether it is Saturday or Sunday. If the given date, the WEEKDAY function returns a number 1-7 for every day of the week. With the configuration given, Saturday is 7, and Sunday is 1. With the OR function, we have used WEEKDAY to test for either 1 or 7. If either is true, the formula gives us and return as TRUE and will trigger the conditional formatting.

Sometimes, we have to highlight the entire row, then we have to apply the conditional formatting to all the table and have to lock the date column. Then, it will give us the desired result for the whole data. We have to lock it by using $ or pressing F4 near the cell address in the formula. The formula should be like this: =OR(WEEKDAY($B2)=7,WEEKDAY($B2)=1) .

or example 4-2

Below pic is with conditional formatting formula; that is why weekend gets highlighted, i.e. Saturday and Sunday:

or example 4-3

Things to Remember About OR Function in Excel

  • The OR function can also be combined with AND and IF.
  • The return value of OR Function is TRUE or FALSE.
  • The OR function is used to test two or more condition or arguments at a time.
  • The value or result depends upon the logic or arguments given.
  • The maximum number of conditions or arguments can be 255, which is applied simultaneously in the OR function.
  • The OR Function will give a result as #VALUE if there is no logic found in the formula or arguments.
  • The text values or empty cells supplied as arguments, then ignored.

Recommended Articles

This has been a guide to OR in Excel. Here we discuss the OR Formula and how to use OR Function in Excel, along with practical examples and a downloadable excel template. You can also go through our other suggested articles –

  1. AND Function in Excel
  2. LOOKUP in Excel
  3. COLUMN Function in Excel
  4. ISERROR Excel Function

All in One Excel VBA Bundle (120+ Courses, 30+ Projects)

120+ Online Courses

30+ Projects

500+ Hours

Verifiable Certificates

Lifetime Access

Learn More

8 Shares
Share
Tweet
Share
Primary Sidebar
Excel Functions
  • Logical Functions in Excel
    • Excel IF AND Function
    • IFERROR Formula in Excel
    • SUMIF with Multiple Criteria
    • Excel SUMIFS with Dates
    • FALSE Function in Excel
    • Excel IF Function
    • Excel Logical Test
    • Excel XOR Function
    • Logical Functions Excel
    • IFERROR Excel Function
    • TRUE Function in Excel
    • OR Function in Excel
    • NOT in Excel
    • AND Function in Excel
  • Excel Functions (12+)
  • Excel Tools (114+)
  • Financial Functions in Excel (17+)
  • Lookup Reference Functions in Excel (34+)
  • Maths Function in Excel (47+)
  • TEXT and String Functions in Excel (26+)
  • Date and Time Function in Excel (23+)
  • Statistical Functions in Excel (59+)
  • Information Functions in Excel (4+)
  • Excel Charts (56+)
  • Excel Tips (222+)
  • Workplace Productivity (4+)
  • Microsoft Office Tools (15+)
  • Excel Formula and Functions (21+)
  • MS Excel Shortcuts (4+)
Excel Functions Courses
  • Online EXCEL ADVANCED COURSE
  • Excel Data Analysis Certification
  • Excel for Marketing Certification
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Excel Charts
  • Excel Tips
  • All Tutorials
Certification Courses
  • All Courses
  • Excel VBA Course - All in One Bundle
  • VBA Course
  • Excel Data Analysis Course
  • Excel for Marketing Course
  • Excel for Finance Course
  • Excel for HR Training

© 2022 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

Download OR function Excel Template

EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

डाउनलोड OR function Excel Template

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

Independence Day Offer - Online EXCEL ADVANCED COURSE Learn More