Detailed description of logical operators in an EXCEL worksheet

Source: Internet
Author: User
Tags logical operators

We often use logical judgment in EXCEL, but we seldom use logical operators, probably because we are not so happy with multi-condition judgment. As tables become more AND more complex, some EXCEL-related knowledge is greatly supplemented, including the logical operators 'and', 'or', '+', AND '*' in EXCEL ','*'.

Logical operators
Logical operators are generally divided into (AND) AND (OR) OR two types in other languages,
It is no exception in EXCEL, but there are two more abbreviations (I personally think), and this shorthand syntax format is not the same.
AND logic AND
Logic and,
TRUE is returned when the logical values of all parameters are TRUE. If the logical values of a parameter are FALSE, FALSE is returned.
OR logic OR
Logic or
In the parameter group, if the logical value of any parameter is TRUE, TRUE is returned. If the logical value of any parameter is FALSE, FALSE is returned.
+ (Better) logic and
AND can be replaced *.
* (Multiplication) logic or
OR can be replaced by +.
Usage
And or usage
If you already know the concepts of TRUE and FALSE
You can see the following equations:

The code is as follows: Copy code
AND (TRUE, FALSE)
= AND (1, 1, 1, 1, 0)
= 0
OR (FALSE, TRUE)
= OR)
= 1

+ And * usage
Or the equation above. Pay attention to the added details.

The code is as follows: Copy code
AND (TRUE, FALSE)
= AND (1, 1, 1, 1, 0)
= 1*1*1*1*1*0
= 0
OR (FALSE, TRUE)
= OR)
= 0 + 0 + 0 + 0 + 0 + 1
= 1

Example

Chinese Mathematics (*) Solution (+) Solution
91 100 Excellent Full Score
45 89    
90 99 Excellent  
100 89   Full Score
89 91    
100 100 Excellent Full Score

1. What are the "excellent" values displayed when the scores of the two subjects are greater than or equal to 90 "? (*) Solution

The code is as follows: Copy code

= IF (A $15: A $20> = 90) * (B $15: B $20> = 90), "excellent ","")

2. If the score of one or more subjects is used, the full score is displayed "? (+) Solution

The code is as follows: Copy code
= IF (A $15: A $20 = 100) + (B $15: B $20 = 100), "full score ","")

Summary
Because we seldom use this logical operator in EXCEL,
Therefore, when we make multi-condition judgments, we often need to use some transitional cells for the transition,
However, with the help of these logical operators, when performing multi-condition judgment, we can simplify many steps.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.