Excel logical operators

Source: Internet
Author: User
Tags logical operators range require
The so-called logical operators are the same as, or, are, non, true, false and so on conditions to determine the symbol. Here are six articles.

1.AND

Purpose: Returns True when the logical value of all parameters is true (true), or False (false) as long as the logical value of one parameter is false.

Syntax: and (Logical1,logical2, ...).

Parameters: Logical1,logical2, ... is the 1~30 logical expression to be tested, whose conclusion is true (true) or False (false). The argument must be a logical value or an array or reference that contains logical values, and if the array or reference has text or blank cells, its value is ignored. If the specified range of cells contains a non logical value, and the error value #value! is returned.

Instance: If a1=2, a=6, then the formula "=and (A1A2)" returns false. If b4=104, then the formula "=if" (and (1)

2.FALSE

Purpose: Returns the logical value FALSE.

Syntax: FALSE ()

Parameter: The function does not require arguments

Instance: If you enter the formula "=false ()" In the A1 cell, return to FALSE after the carriage return. Entering text in a cell or formula False,excel automatically interprets it as a logical value false.

3.IF

Purpose: To perform logical judgments, which can return different results depending on the true and false of the logical expression, thus performing the conditional detection task for the numeric or formula.

Syntax: IF (logical_test,value_if_true,value_if_false).

Parameter: Logical_test any value or expression that evaluates to True or false; Value_if_true is the return value of the function when Logical_test is true, if Logical_test is true and the Value_ is omitted If_true, returns True. And value_if_true can be an expression; Value_if_false is the return value of the function when Logical_test is false. Returns False if Logical_test is false and Value_if_false is omitted. Value_if_false can also be an expression.

Instance: Formula "=if" (c2>=85, "A", if (c2>=70, "B", if (c2>=60, "C", if (c2<60, "D")) ", where the second if statement is also the argument of the first if statement. Similarly, the third if statement is the argument for the second if statement, and so on. For example, if the first logical judgment expression is c2>=85, the D2 cell is assigned A value of "A", and if the first logical judgment expression c2>=85 is not true, the second if statement "if" (c2>=70) is computed, and so on until the end of the calculation, This function is widely used in situations where logical judgment is required.

4.NOT

Purpose: To find the opposite value of a logical value or logical expression. If you want to make sure that a logical value is equal to its opposite value, you should use the NOT function.

Syntax: Not (logical)

Parameter: Logical is a logical value or logical expression that can draw a true or false conclusion. If the logical value or expression evaluates to False, the NOT function returns True, and if the logical value or expression evaluates to True, then the NOT function returns FALSE.

Example: If a1=6, a2=8, then the formula "=not" (A1

5.OR

Purpose: Returns True (true) if any of the logical values in the parameters are true.

Syntax: OR (Logical1,logical2, ...)

Parameters: Logical1,logical2, ... is a 1-to-30 logical expression that needs to be validated, with a conclusion of true or false. If an array or reference parameter contains text, numbers, or blank cells, they are ignored. If the specified range does not contain logical values, the OR function returns the error #value!.

Instance: If A1=6, a2=8, the formula "=or (A1+A2>A2,A1=A2)" returns True, and the formula "=or (A1>A2,A1=A2)" returns false.

6.TRUE

Purpose: Returns the logical value TRUE.

Syntax: TRUE ()

Parameter: The function does not require arguments

Instance: If you enter the formula "=true ()" In cell A1, returns TRUE after carriage return. Entering text in a cell or formula True,excel automatically interprets it as a logical value TRUE. The function true is primarily used for compatibility with other spreadsheet programs.

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.