Функция NOT (НЕ) в Excel используется для изменения логического выражения TRUE (Истина) / FALSE (Ложь).
Содержание
- Что возвращает функция
- Синтаксис
- Аргументы функции
- Дополнительная информация
- Примеры использования функции NOT (НЕ) в Excel
- Пример 1. Конвертируем значение TRUE (Истина) в FALSE (Ложь), и наоборот.
- Пример 2. Используем функцию NOT (НЕ) с результатом формулы
- Пример 3. Используем функцию NOT (НЕ) с числовыми значениями
Что возвращает функция
Логический аргумент, который является обратным логическому аргументу, используемому в функции NOT. Например, =NOT(TRUE) возвращает FALSE (Ложь) и =NOT(FALSE) возвращает TRUE(Истина).
Синтаксис
=NOT (logical) — английская версия
=НЕ(логическое_значение) — русская версия
Аргументы функции
- logical (логическое значение) — значение или выражение, которое может быть логически оценено как TRUE (Истина) или FALSE (Ложь)
Дополнительная информация
С помощью функции NOT (НЕ) в Excel вы можете проверить выражение, которое принимает значение TRUE или FALSE. Например, =NOT(1 + 1 = 2) вернет FALSE.
Больше лайфхаков в нашем Telegram Подписаться
Примеры использования функции NOT (НЕ) в Excel
Пример 1. Конвертируем значение TRUE (Истина) в FALSE (Ложь), и наоборот.
Функция преобразует TRUE (Истина) в FALSE (Ложь) и FALSE (Ложь) в TRUE (Истина). Аргумент внутри функции также может быть результатом другой функции, результатом которой являются TRUE / FALSE.
Пример 2. Используем функцию NOT (НЕ) с результатом формулы
Если вы используете функцию с результатом какой-либо формулы (которая возвращает значения TRUE или FALSE), то она конвертирует результат TRUE в FALSE и наоборот. На примере выше, значение в ячейке А2 сравнивается с числом. По результату вычисления, при совпадении условий формулы, NOT (НЕ) выдаст FALSE, или отразит TRUE, если значение не совпадает с условиями.
Пример 3. Используем функцию NOT (НЕ) с числовыми значениями
В Excel, по умолчанию принято, что цифровое значение “0” (ноль) принимается за FALSE, а любое положительное значение — TRUE. Функция NOT (НЕ) при использовании с числами конвертирует “0” (ноль) в TRUE (Истина) и любое позитивное значение или отрицательное в FALSE (Ложь).
Things will not always be the way we want them to be. The unexpected can happen. For example, let’s say you have to divide numbers. Trying to divide any number by zero (0) gives an error. Logical functions come in handy such cases. In this tutorial, we are going to cover the following topics.
In this tutorial, we are going to cover the following topics.
- What is a Logical Function?
- IF function example
- Excel Logic functions explained
- Nested IF functions
What is a Logical Function?
It is a feature that allows us to introduce decision-making when executing formulas and functions. Functions are used to;
- Check if a condition is true or false
- Combine multiple conditions together
What is a condition and why does it matter?
A condition is an expression that either evaluates to true or false. The expression could be a function that determines if the value entered in a cell is of numeric or text data type, if a value is greater than, equal to or less than a specified value, etc.
IF Function example
We will work with the home supplies budget from this tutorial. We will use the IF function to determine if an item is expensive or not. We will assume that items with a value greater than 6,000 are expensive. Those that are less than 6,000 are less expensive. The following image shows us the dataset that we will work with.
- Put the cursor focus in cell F4
- Enter the following formula that uses the IF function
=IF(E4<6000,”Yes”,”No”)
HERE,
- “=IF(…)” calls the IF functions
- “E4<6000” is the condition that the IF function evaluates. It checks the value of cell address E4 (subtotal) is less than 6,000
- “Yes” this is the value that the function will display if the value of E4 is less than 6,000
-
“No” this is the value that the function will display if the value of E4 is greater than 6,000
When you are done press the enter key
You will get the following results
Excel Logic functions explained
The following table shows all of the logical functions in Excel
S/N | FUNCTION | CATEGORY | DESCRIPTION | USAGE |
---|---|---|---|---|
01 | AND | Logical | Checks multiple conditions and returns true if they all the conditions evaluate to true. | =AND(1 > 0,ISNUMBER(1)) The above function returns TRUE because both Condition is True. |
02 | FALSE | Logical | Returns the logical value FALSE. It is used to compare the results of a condition or function that either returns true or false | FALSE() |
03 | IF | Logical |
Verifies whether a condition is met or not. If the condition is met, it returns true. If the condition is not met, it returns false. =IF(logical_test,[value_if_true],[value_if_false]) |
=IF(ISNUMBER(22),”Yes”, “No”) 22 is Number so that it return Yes. |
04 | IFERROR | Logical | Returns the expression value if no error occurs. If an error occurs, it returns the error value | =IFERROR(5/0,”Divide by zero error”) |
05 | IFNA | Logical | Returns value if #N/A error does not occur. If #N/A error occurs, it returns NA value. #N/A error means a value if not available to a formula or function. |
=IFNA(D6*E6,0) N.B the above formula returns zero if both or either D6 or E6 is/are empty |
06 | NOT | Logical | Returns true if the condition is false and returns false if condition is true |
=NOT(ISTEXT(0)) N.B. the above function returns true. This is because ISTEXT(0) returns false and NOT function converts false to TRUE |
07 | OR | Logical | Used when evaluating multiple conditions. Returns true if any or all of the conditions are true. Returns false if all of the conditions are false |
=OR(D8=”admin”,E8=”cashier”) N.B. the above function returns true if either or both D8 and E8 admin or cashier |
08 | TRUE | Logical | Returns the logical value TRUE. It is used to compare the results of a condition or function that either returns true or false | TRUE() |
A nested IF function is an IF function within another IF function. Nested if statements come in handy when we have to work with more than two conditions. Let’s say we want to develop a simple program that checks the day of the week. If the day is Saturday we want to display “party well”, if it’s Sunday we want to display “time to rest”, and if it’s any day from Monday to Friday we want to display, remember to complete your to do list.
A nested if function can help us to implement the above example. The following flowchart shows how the nested IF function will be implemented.
The formula for the above flowchart is as follows
=IF(B1=”Sunday”,”time to rest”,IF(B1=”Saturday”,”party well”,”to do list”))
HERE,
- “=IF(….)” is the main if function
- “=IF(…,IF(….))” the second IF function is the nested one. It provides further evaluation if the main IF function returned false.
Practical example
Create a new workbook and enter the data as shown below
- Enter the following formula
=IF(B1=”Sunday”,”time to rest”,IF(B1=”Saturday”,”party well”,”to do list”))
- Enter Saturday in cell address B1
- You will get the following results
Download the Excel file used in Tutorial
Summary
Logical functions are used to introduce decision-making when evaluating formulas and functions in Excel.
The NOT Excel function is a logical function in Excel called the negation function. It negates the value returned through a function or a value from another logical function. This built-in function in Excel takes a single argument: the logic, which can be a formula or a logical value.
For example, suppose we inserted the Excel NOT function in the dataset and conducted the logical test. As a result, it may return the opposite of a given logical or Boolean value. Suppose one value is TRUE, NOT function returns as FALSE. And when the given value is FALSE, NOT function may return TRUE. The NOT function can reverse a logical value.
Table of contents
- NOT Function in Excel
- Syntax
- Compulsory Parameter:
- Examples
- Example #1
- Example #2
- Example #3
- Example #4
- Recommended Articles
- Syntax
Syntax
Compulsory Parameter:
- Logical: The numeric value 0 is considered “False,” and the rest of the values are considered “True.” Logical is an expression that either calculates the TRUE or FALSE if it returns TRUE if the expression is FALSE and returns FALSE if the expression is TRUE.
Examples
You can download this NOT Function Excel Template here – NOT Function Excel Template
Example #1
We must check which value is greater than 100; then, we can use the NOT function in the Logical testA logical test in Excel results in an analytical output, either true or false. The equals to operator, “=,” is the most commonly used logical test.read more column. It will return the reverse return if the value is greater than 100, then it will return FALSE, and if the value is less than or equal to 100, it will return the TRUE as output.
Example #2
Let us consider another example wherein we must exclude the color combination red and blue from the toy data set. Then, we can use the NOT function to filter out this combination. But, again, the output will be TRUE because the color is red here.
Example #3
Let us take the employee data wherein we must find the bonus amount for employees who did the extra task and no bonus for those who did not perform the additional task, and employees get ₹100 for each extra task.
The output will be = ₹7500 as it will first check for a blank entry in a cell. If not empty, it will multiply the extra task and 100 to calculate the bonus unlocked by the employee.
Example #4
Suppose we have to check colors, such as for the example below, we have to filter out the toy name with the color blue or red from the given data set.
First, this will check the condition if the color column contains any toy with blue or red if the condition is TRUE, then it will return blank as output; if not TRUE, it will return x as output.
Recommended Articles
This article is a guide to NOT Function in Excel. We discuss using the NOT Excel function, examples, and downloadable Excel templates. You may also look at these useful functions in Excel: –
- VBA Not FunctionThe VBA NOT function in MS Office Excel VBA is a built-in logical function. If a condition is FALSE, it yields TRUE; otherwise, it returns FALSE. It works as an inverse function.read more
- Excel Mathematical FunctionMathematical functions in excel refer to the different expressions used to apply various forms of calculation. The seven frequently used mathematical functions in MS excel are SUM, AVERAGE, AVERAGEIF, COUNTA, COUNTIF, MOD, and ROUND.read more
- Error Handling in VBAVBA error handling refers to troubleshooting various kinds of errors encountered while working with VBA. read more
- Excel Recording MacrosRecording macros is a method whereby excel stores the tasks performed by the user. Every time a macro is run, these exact actions are performed automatically. Macros are created in either the View tab (under the “macros” drop-down) or the Developer tab of Excel.
read more - Hide Formula in ExcelHiding formula in excel is used when we do not want the formula to be displayed in the formula bar when we click on a cell with formulas. We can format the cells, check the hidden checkbox, and protect the worksheet.read more
The TRUE function in Excel is intended to indicate a logical true value and returns it as a result of calculations.
The FALSE function in Excel is used to specify a logical false value and returns it accordingly.
The NOT function in Excel returns the opposite of the specified logical value. For example, writing = NOT (TRUE) will return the result FALSE.
Examples of using the logical functions true, false and not in Excel
Example 1. The Excel spreadsheet stores the phone numbers of various organizations. Calls to some of them are free of charge (code 8800), while the rest are charged at the rate of 1.5 rubles per minute. Determine the cost of calls made.
Data table:
In the “Free” column we display the logical values TRUE or FALSE according to the following condition: is the phone number code equal to “8800”? We introduce the formula in cell C3:
Argument Description:
- LEFT (B3; 4) = «8800» — condition for checking the equality of the first four characters of the string to the specified value («8800»).
- If the condition is met, the TRUE () function will return a true logical value;
- If the condition is not fulfilled, the FALSE () function will return a false logical value.
Similarly, we determine whether the call is free for other rooms. Result:
To calculate the cost, we use the following formula:
Argument Description:
- C3 = TRUE () — checking the condition «is the value stored in cell C3 equal to the value returned by the function (logical truth)?».
- 0- call cost, if the condition is met.
- D3 * 1.5 — the cost of the call, if the condition is not met.
Calculation results:
We received the total cost of all calls made by all organizations.
How to calculate the average value of the condition in Excel
Example 2. Determine the average score for the exam for a group of students, in the composition of which there are students who have failed. It is also necessary to obtain an average assessment of performance only for those students who have passed the exam. The grade of the student who did not pass the exam must be counted as 0 (zero) in the formula for the calculation.
Data table:
To fill in the “Passed” column, use the formula:
Result of calculations:
Create a new column in which we rewrite the estimates, provided that grade 2 is interpreted as 0 using the formula:
Result of calculations:
We determine the average score by the formula:
=AVERAGE(D3:D14)
Result:
Now we get the average grade point for students who are admitted to the next exams. To do this, we use another logical function AVERAGEIF:
How to get the value module numbers without using the abs function
Example 3. Implement an algorithm for determining the value of the modulus of a number (absolute value), that is, an alternative for the ABS function.
Data table:
To solve, we use the array formula:
=IF(NOT(A3<0),A3,A3*(-1))
Argument Description:
- NOT (A3: A10 <0) — checking the condition “does the number belong to a range of positive values or is it 0 (zero)?”. Without the use of the function, a longer version of the OR record would not be required (A3: A10 = 0, A3: A10> 0);
- A3: A10 — the returned number (the corresponding element from the range), if the condition is met;
- A3: A10 * (- 1) — the returned number, if the condition is not met (that is, the initial value belongs to the range of negative numbers, to obtain the module, multiply by -1).
Result:
Note: as a rule, the logical values and the functions themselves (TRUE (), FALSE ()) are not explicitly indicated in the expressions, as is done in examples 1 and 2. For example, to avoid intermediate calculations in Example 2, you could use the formula = IF B3 = 2, 0, B3), and also = B3 <> 2.
At the same time, Excel automatically determines the result of calculating the expression B3 <> 2 or B3 = 2, 0, B3 in the arguments of the IF function (logical comparison) and on its basis performs the corresponding action prescribed by the second or third arguments of the IF function.
Features of use of functions true, false, not in Excel
In functions TRUE and FALSE Arguments are absent.
The function does NOT have the following syntax notation:
=NOT( logical value )
Argument Description:
- logical is a required argument characterizing one of two possible values: TRUE or FALSE.
Notes:
- If the argument logical value of the function is NOT used the number 0 or 1, they are automatically converted to logical values FALSE and TRUE, respectively. For example, the function = NOT (0) returns TRUE, = NOT (1) returns FALSE.
- If any numeric value> 0 is used as an argument, the function will NOT return FALSE.
- If the only argument of the function is NOT a text string, the function will return the error code #VALUE !.
- In computing, a special logical data type is used (in programming, it has the name “Boolean” type or Boolean in honor of the famous mathematician George Boole). This data type operates with only two values: 1 and 0 (TRUE, FALSE).
- In Excel, the true logical value also corresponds to the number 1, and the false logical value also corresponds to the numerical value 0 (zero).
- The functions TRUE () and FALSE () can be entered in any cell or used in the formula and will be interpreted as logical values, respectively.
- Both of the above functions are necessary to ensure compatibility with other software products designed for working with tables.
- The function does NOT allow you to expand the capabilities of functions intended to perform a logical test. For example, when using this function as an argument to log_expression of an IF function, you can check several conditions at once.
Download examples of formulas TRUE FALSE and NOT
NOT in Excel
NOT function is an inbuilt function that is categorized under the Logical Function; the logical function operates under a logical test. It is also called Boolean logic or function. Boolean functions are most commonly used along with or in conjunction with other functions, specifically along with conditional test functions (“IF’’ FUNCTION), to create formulas that can evaluate multiple parameters or criteria and produce desired results depending on that criteria. It is used as an individual function or part of the formula and other excel functions in a cell. E.G. with AND, IF & OR function. It returns the opposite value of a given logical value in the formula, NOT function is used to reverse a logical value. If the argument is FALSE, then TRUE is returned and vice versa.
Note: Use NOT function when you want to make sure a value is not equal to one Specific or particular value
It’s a worksheet function; it is also used as part of the formula in a cell along with other excel function
- If given with the value TRUE, the Not function returns FALSE
- If given with the value FALSE, the Not function returns TRUE
NOT Formula in Excel
Below is the NOT Formula in excel:
=NOT (logical) logical – A value that can be evaluated to TRUE or FALSE
The only parameter in the NOT function is a logical value.
The logical test or argument can be either entered directly, or it can be entered as a reference to a cell that contains a logical value, and it always returns the Boolean value (“TRUE” OR “FALSE”) only.
How to Use the NOT Function in Excel?
NOT Function in Excel is very simple and easy to use. Let us now see how to use the NOT function in excel with the help of some examples.
You can download this NOT function Excel Template here – NOT function Excel Template
Example #1 – Excel NOT Function
Here a logical test is performed on the given set of values (Student score) by using the NOT function. Here, we will check which value is greater than or equal to 50.
In the table, we have 2 columns, the first column contains student score & the second column is the logical test column, where the NOT function is performed.
Result: It will return the reverse value if the value is greater than or equal to 50, then it will return FALSE and if the lesser than or equal to 50, it will return TRUE as output.
The result will be as given below:
Example #2 – Using NOT Function with ISBLANK
the logical test is performed on the H5 & H6 Cells by using the NOT Function along with ISBLANK function; here will check if cells H5 & H6 is blank OR not using NOT function along with ISBLANK in excel
OUTPUT will be TRUE.
Example #3 – NOT Function along with “IF” and “OR” Function
Here the color check is performed for the cars in the below-mentioned table by using NOT Function along with “if” and “or” function
Here we have to sort out color “WHITE” or “RED” from the given set of data
=IF(NOT(OR(H11=”RED”,H11=”WHITE”)),”x”,””) formula is used
This logical condition is applied on a Color column containing any car with color “RED” or “WHITE”,
if the condition is true, then it will return blank as output,
if not true, then it will return x as output
Example #4 – VALUE! Error
It Occurs when the supplied argument is not a logical or numeric value.
Suppose, if we give a range in the logical argument
Selected the range C22:D22 in the logical argument, i.e. =NOT (C22:D22)
a function returns a #VALUE error because the NOT function does not allow any range and can take only a logical test or argument or one condition.
Example #5 – NOT Function for an empty cell or blank or “0”
An empty cell or blank or “0” are treated as false, therefore “NOT” function returns TRUE
Here in the cell “I23”, the stored value is “0” suppose if I apply the “NOT” function with logical argument or value as “0” or “I23”, Output will be TRUE.
Example #6 – NOT Function for Decimals
When the value is decimal in a cell
Suppose if we take the argument as decimals, i.e. suppose if I apply the “NOT” function with logical argument or value as “225.25” or “c27”, Output will be FALSE.
Example #7 – NOT Function for Negative Number
When the value is a negative number in a cell
Suppose if we take the argument as a negative number, i.e. suppose if I apply the “NOT” function with logical argument or value as “-4” or “H27”, Output will be FALSE.
Example #8 – When the value or Reference is Boolean Input in NOT Function
When the value or reference is Boolean input (“TRUE” OR “FALSE”) in a cell.
Here in the cell “C31”, the stored value is “TRUE” suppose if I apply the “NOT” function with logical argument or value as “C31” or “TRUE”, Output will be FALSE. It will be vice versa if the logical argument is “FALSE”, i.e. the NOT function returns the “TRUE” value as output.
Recommended Articles
This has been a guide to NOT Function. Here we discuss the NOT Formula and how to use the NOT function along with practical examples and downloadable excel templates. You can also go through our other suggested articles –
- FV Function in Excel
- LOOKUP in Excel
- MINVERSE in Excel
- Write Formula in Excel
This post will guide you how to use excel if formula with NOT logical function in Microsoft excel.
Table of Contents
- NOT Logical Function
- Excel IF Formula Combining With NOT
- NOT Function combining with ISBLANK function
- Related Formulas
- Related Functions
The syntax of NOT logical function is as follow:
=NOT(logical_value)
The NOT logical function will return the reversed logical value. If the logical_value is TRUE, then FALSE is returned. If the logical_value is FALSE, then TRUE is returned. Let’s see the below two examples:
=NOT(FALSE) =NOT(2+1=3)
Both of the above excel formulas will return TRUE.
Excel IF Formula Combining With NOT
If you want to check several test conditions in an excel formula,then take different actions. You can use NOT function in combination with the AND or OR logical function in excel IF function.
Let’s see the following excel if formula:
=IF(NOT(OR(B1="red",B1="black")),TRUE,FALSE)
In the above formula, the excel formula will exclude both red and blank colors. It will check cells in column B if the values is NOT red or blank. TRUE or FALSE will be returned.
Actually, we also can use the Not equal to (<>) logical operator to achieve the same requirement , For example, we can write down the following excel IF formula to reflect the above logic test.
=IF(AND(B1<>”red”,B1<>”black”)),TRUE,FALSE)
NOT Function combining with ISBLANK function
As you know, the function ISBLANK(B1) will return TRUE if the cell B1 is blank. If we use NOT function to enclose ISBLANK(B1) function, it will reverse the result, if the cell is blank, then returns FALSE.
Let’s create a nested IF statement with the NOT and ISBLANK functions as follow:
=IF(NOT(ISBLANK(B1)),B1*5,””)
For above IF statement, IF the cell B1 is not blank, then multiply the number in B1 by 5.we can enter the above formula into cell C1, and then drag the Fill Handle to the range C1:C3.it will apply for the other cells for this formula.
- Excel IF formula with equal to logical operator
The “Equal to” logical operator can be used to compare the below data types, such as: text string, numbers, dates, Booleans. This section will guide you how to use “equal to” logical operator in excel IF formula with text string value and dates value… - Excel IF formula with AND logical function
You can use the IF function combining with AND function to construct a condition statement. If the test is FALSE, then take another action… - Excel IF formula with AND & OR logical functions
If you want to test the result of cells based on several sets of multiple test conditions, you can use the IF function with the AND and OR functions at a time…
- Excel OR function
The Excel OR function returns TRUE if any of the conditions are TRUE in logic test. Otherwise, it returns FALSE. - Excel AND function
The Excel AND function returns TRUE if all of arguments are TRUE, and it returns FALSE if any of arguments are FALSE.The syntax of the AND function is as below:= AND (condition1,[condition2],…) … - Excel IF function
The Excel IF function perform a logical test to return one value if the condition is TRUE and return another value if the condition is FALSE…. - Excel nested if function
The nested IF function is formed by multiple if statements within one Excel if function. This excel nested if statement makes it possible for a single formula to take multiple actions… - Excel ISBLANK function
The Excel ISBLANK function returns TRUE if the value is blank or null.The syntax of the ISBLANK function is as below:= ISBLANK (value)… - Excel NOT function
The Excel NOT function returns the opposite of a given logical or Boolean value. For example, if you supplied with the value TRUE, the NOT function will return FALSE; If you supplied with the value FALSE, and the NOT function will TRUE. The syntax of the NOT function is as below:=NOT(logical)…
Purpose
Reverse arguments or results
Usage notes
The NOT function returns the opposite of a given logical or Boolean value. Use the NOT function to reverse a Boolean value or the result of a logical expression.
- When given FALSE, NOT returns TRUE.
- When given TRUE, NOT returns FALSE.
Example #1 — not green or red
In the example shown, the formula in C5, copied down, is:
=NOT(OR(B5="green",B5="red"))
The literal translation of this formula is «NOT green or red». At each row, the formula returns TRUE if the color in column B is not green or red, and FALSE if the color is green or red.
Example #2 — Not blank
A common use case for the NOT function is to reverse the behavior of another function. For example, If cell A1 is blank (empty), the ISBLANK function will return TRUE:
=ISBLANK(A1) // TRUE if A1 is empty
To reverse this behavior, wrap the NOT function around the ISBLANK function:
=NOT(ISBLANK(A1)) // TRUE if A1 is NOT empty
By adding NOT the output from ISBLANK is reversed. This formula will return TRUE when A1 is not empty and FALSE when A1 is empty. You might use this kind of test to only run a calculation if there is a value in A1:
=IF(NOT(ISBLANK(A1)),B1/A1,"")
Translation: if A1 is not blank, divide B1 by A1, otherwise return an empty string («»). This is an example of nesting one function inside another.
This Excel tutorial explains how to use the Excel NOT function with syntax and examples.
Description
The Microsoft Excel NOT function returns the reversed logical value.
The NOT function is a built-in function in Excel that is categorized as a Logical Function. It can be used as a worksheet function (WS) in Excel. As a worksheet function, the NOT function can be entered as part of a formula in a cell of a worksheet.
Syntax
The syntax for the NOT function in Microsoft Excel is:
NOT( logical_value )
Parameters or Arguments
- logical_value
- An expression that either evaluates to TRUE or FALSE. If used with an expression of TRUE, then FALSE is returned. If used with an expression of FALSE, then TRUE is returned.
Returns
If the logical_value is TRUE, then the NOT function will return FALSE.
If the logical_value is FALSE, then the NOT function will return TRUE.
Applies To
- Excel for Office 365, Excel 2019, Excel 2016, Excel 2013, Excel 2011 for Mac, Excel 2010, Excel 2007, Excel 2003, Excel XP, Excel 2000
Type of Function
- Worksheet function (WS)
Example (as Worksheet Function)
Let’s look at some Excel NOT function examples and explore how to use the NOT function as a worksheet function in Microsoft Excel:
Based on the Excel spreadsheet above, the following NOT examples would return:
=NOT(A2="techonthenet.com") Result: FALSE =NOT(TRUE) Result: FALSE =NOT(FALSE) Result: TRUE =NOT(A1<10) Result: FALSE =NOT(A2="Microsoft") Result: TRUE =NOT(5+1=7) Result: TRUE