search
HomeTopicsexcelExcel function learning: three multi-conditional logic functions AND(), OR(), IF()

In the previous article "The omnipotent SUMPRODUCT for Excel function learning! 》, we learned the SUMPRODUCT function. Today we are going to talk about three multi-conditional logic functions AND(), OR(), and IF(). Let’s take a look at the explanation together!

Excel function learning: three multi-conditional logic functions AND(), OR(), IF()

For those who are new to functions, you don’t need to understand complex function formulas right away, but you must understand these three multi-conditional logic functions: AND, OR, IF , these three functions can be said to be the most frequently used when writing nested formulas.

Each function is like a calculator. Each calculator has its own special functions. We only need to follow the rules of the calculator and enter data in the corresponding parameter position, and the calculator will automatically complete the function. Special operations. Look at how cumbersome the formula we entered using operators last time is. With functions, we can simplify our thinking process.

1. AND function

In the table shown below, Bottle wants to find out who are the design interns in the design department. This can be done directly using the filtering function of Excel, but today we are going to learn to use functions to solve problems.

Excel function learning: three multi-conditional logic functions AND(), OR(), IF()

Let’s analyze it first. To find a design intern in the design department, two conditions need to be met: “Column D = design” and “column E = design intern”, and Both conditions must be true at the same time (the last tutorial talked about returning true when the result of the comparison operation is true, and the equal sign is also a comparison operator). So how do we use a formula to express that two conditions need to be true at the same time for the result to be true?

You only need to add a * (multiplication sign) between the two conditions, that is (column D = design) * (column E = design intern). When both are true, the multiplication result is 1, which means that he is a design intern in the design department; when any one of them is false, the result is 0, which means he is not a design intern in the design department.

Enter the formula =(D:D= "Design")*(E:E="Design Intern") in cell I2, press Enter and double-click the lower right corner of cell I2 to fill in the formula. You can see that the I3 result is 1, that is, the Hu Tutu in the third row meets the search conditions.

Excel function learning: three multi-conditional logic functions AND(), OR(), IF()

As you can see, if no one tells you the above method, you will need to turn your head twice more to think of it. In fact, we can directly use the AND function to solve the problem, simplifying the thinking process.

AND (parameter 1, parameter 2...) , when parameter 1 and parameter 2 are both true, the result is true.

Select cell I2 and enter the formula in the edit bar =AND (D:D="Design", E:E="Design Intern")

Excel function learning: three multi-conditional logic functions AND(), OR(), IF()

Then press Enter, you can see that the I2 formula result is FALSE. Place the mouse on the lower right corner of cell I2 and double-click to fill in the formula. You can see that only cell I3 is true. The design intern we are looking for is Hu Tutu in row 3.

Excel function learning: three multi-conditional logic functions AND(), OR(), IF()

2. OR function

If you want to find the HR specialist or HR manager, just find any Just one person.

The previous bottle used multiplication to ensure that two conditions are met at the same time. Now you can use addition to ensure that any one condition is met.

(Column E=Human Resources Manager) (Column E=Human Resources Specialist), as long as one of them is true, the result of the addition is 1; when both are false, the result is 0.

Enter the formula =(E:E="Personnel Manager") (E:E="Personnel Specialist") in cell I2, press Enter and double-click the lower right corner of cell I2 to fill in formula. You can see that I4 and I7 result in 1.

Excel function learning: three multi-conditional logic functions AND(), OR(), IF()

Similarly, we can also use OR to solve this problem.

OR (parameter 1, parameter 2...) , two parameters, if any one is true, the result is true, if both are false, the result is FALSE.

Enter the formula in cell I2 =OR (E:E="Personnel Manager", E:E="Personnel Specialist"), press Enter, double-click to fill in the formula, the results are as follows , the same lines 4 and 7 are true.

Excel function learning: three multi-conditional logic functions AND(), OR(), IF()

3. IF function

The first two functions are judgment functions and can only judge parameters Whether it is true or false, the output results are only true and false. If the bottle wants to directly output the person's name, it needs to be nested using the IF function.

IF function has three parameters, IF (condition, return value when the condition is true, return value when the condition is false), parameter 1 represents the condition, in the first case above, the condition is the design internship of the design department Health; when the result is true, parameter 2 is returned, which is the corresponding name; when the result is false, parameter 3 is returned, which means that it is not the person you are looking for, so we set the return to blank.

Based on the above analysis, we can write the formula in cell I2

=IF(and(D:D="Design",E:E="Design Internship Raw"),B:B," "), double-click to fill.

Excel function learning: three multi-conditional logic functions AND(), OR(), IF()

In the same way, we can write the formula for the second case.

=IF (OR (E:E="Human Resources Manager", E:E="Human Resources Specialist"),B:B," "), double-click to fill. The results are as follows.

Excel function learning: three multi-conditional logic functions AND(), OR(), IF()

Okay, that’s it for today’s course. In order to test your learning effect, I’ll leave you with a question below.

As shown below, the boss is going to distribute a subsidy to everyone, and the subsidy will be distributed according to the number of years of service. So how to write the formula for the subsidy column?

Excel function learning: three multi-conditional logic functions AND(), OR(), IF()

Just use the IF function you learned earlier to solve the problem. Although it is not the easiest way to solve the problem, it can train everyone's hands, especially the formulas require Chinese and English. When switching, and when some characters need to be enclosed in double quotes, errors are most likely to occur. Function experts can also think about whether there is a simpler function that can solve the problem!

Related learning recommendations: excel tutorial

The above is the detailed content of Excel function learning: three multi-conditional logic functions AND(), OR(), IF(). For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:部落窝教育. If there is any infringement, please contact admin@php.cn delete
MEDIAN formula in Excel - practical examplesMEDIAN formula in Excel - practical examplesApr 11, 2025 pm 12:08 PM

This tutorial explains how to calculate the median of numerical data in Excel using the MEDIAN function. The median, a key measure of central tendency, identifies the middle value in a dataset, offering a more robust representation of central tenden

Google Spreadsheet COUNTIF function with formula examplesGoogle Spreadsheet COUNTIF function with formula examplesApr 11, 2025 pm 12:03 PM

Master Google Sheets COUNTIF: A Comprehensive Guide This guide explores the versatile COUNTIF function in Google Sheets, demonstrating its applications beyond simple cell counting. We'll cover various scenarios, from exact and partial matches to han

Excel shared workbook: How to share Excel file for multiple usersExcel shared workbook: How to share Excel file for multiple usersApr 11, 2025 am 11:58 AM

This tutorial provides a comprehensive guide to sharing Excel workbooks, covering various methods, access control, and conflict resolution. Modern Excel versions (2010, 2013, 2016, and later) simplify collaborative editing, eliminating the need to m

How to convert Excel to JPG - save .xls or .xlsx as image fileHow to convert Excel to JPG - save .xls or .xlsx as image fileApr 11, 2025 am 11:31 AM

This tutorial explores various methods for converting .xls files to .jpg images, encompassing both built-in Windows tools and free online converters. Need to create a presentation, share spreadsheet data securely, or design a document? Converting yo

Excel names and named ranges: how to define and use in formulasExcel names and named ranges: how to define and use in formulasApr 11, 2025 am 11:13 AM

This tutorial clarifies the function of Excel names and demonstrates how to define names for cells, ranges, constants, or formulas. It also covers editing, filtering, and deleting defined names. Excel names, while incredibly useful, are often overlo

Standard deviation Excel: functions and formula examplesStandard deviation Excel: functions and formula examplesApr 11, 2025 am 11:01 AM

This tutorial clarifies the distinction between standard deviation and standard error of the mean, guiding you on the optimal Excel functions for standard deviation calculations. In descriptive statistics, the mean and standard deviation are intrinsi

Square root in Excel: SQRT function and other waysSquare root in Excel: SQRT function and other waysApr 11, 2025 am 10:34 AM

This Excel tutorial demonstrates how to calculate square roots and nth roots. Finding the square root is a common mathematical operation, and Excel offers several methods. Methods for Calculating Square Roots in Excel: Using the SQRT Function: The

Google Sheets basics: Learn how to work with Google SpreadsheetsGoogle Sheets basics: Learn how to work with Google SpreadsheetsApr 11, 2025 am 10:23 AM

Unlock the Power of Google Sheets: A Beginner's Guide This tutorial introduces the fundamentals of Google Sheets, a powerful and versatile alternative to MS Excel. Learn how to effortlessly manage spreadsheets, leverage key features, and collaborate

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.