If you haven't used IF statements yet, check out our IF statement tutorial first. The following example uses the IF function. Hint: For the last example above, you'll have to read up on how the RIGHT function works if you don't already know it! Output: FALSE = RIGHT( "Boston, MA", 2) "MA" Can you tell why the following formulas output the given results? = "Boston" "San Francisco" Of course, "" doesn't have to be used on numbers. This formula outputs FALSE, because 45 is equal to 45. Let's take a look at another simple example using integers: = 45 45 The above formula outputs TRUE, because 6 does not equal 8. Let's take a look at the "does not equal" operator in action to see how we can use it in a simple formula: = 6 8 This is the exact opposite functionality of the equals sign (=), which will output TRUE if the values on either side of it are equal and FALSE if they are not. If they are not equal, it will output TRUE, and if they are equal, it will output FALSE. Whenever Excel sees this symbol in your formulas, it will assess whether the two statements on opposite sides of these brackets are equal to one another. Well, now you learned how to use Not Equal to ‘’ in Excel.Excel's "does not equal" operator is simple: a pair of brackets pointing away from each other, like so: " ". We can use the operator with SUMIF function to sum all values from the range (B2:B17) whose adjacent cells (A2:A17) are not equal to ‘Mango’. In the example below, we want to find the total number of fruits ordered that are not mango. The general structure of SUMIF function is: =SUMIF(range,criteria,) The SUMIF function is used to sum all the numbers when adjacent cells match a certain condition in a range. Using ‘Not Equal To’ with SUMIF Function in Excel The formula counts cells C2 to C9 if the value is NOT ‘FAIL’. Below is the formula used: =COUNTIF(C2:C9,"FAIL") And we want to count the number of students who have passed the test. Let’s say we have a student’s marks list. The criteria used in COUNTIF are logical conditions that support logical operators (>,=). If you want to count the number of cells with a value not equal to the specified value, enter COUNTIF with the ‘’ operator. Using ‘Not Equal To’ with COUNTIF Function in ExcelĮxcel COUNTIF function counts the cells that meet a given condition in a range. Now, drag the fill handle to apply the formula to other cells. The formula above checks if the quantity of a product (C2) is not equal to 100, if it’s any less than hundred, then it returns ‘Restock’ in cell D2 if quantity is equal to 100, then it returns ‘Full stock’. Use the below formula: =IF(C2100,"Restock","Full stock") If a product’s stock goes below 100, we need to restock it. Let’s assume we have an inventory list, which lists products and their quantities. The syntax for the IF function is: =IF(logical_test,) The IF function checks whether certain conditions are met and in case that they are, it returns a certain result, else it returns another result. The operator is very useful on its own, but it becomes more useful when combined with an IF function. Using ‘Not Equal To’ with IF Function in Excel Now that we’ve learned how the ‘not equal’ operator works, let’s see how to effectively combine it in other functions. Remember ‘Not Equal to’ operator in Excel is ‘case-insensitive’, which means even if the values are in different text cases, case differences will be ignored as shown below. It works the same way as it does with the number value. Let’s see how the ‘Not Equal to’ operator works with text values. Here, the formula in cell C6 returns FALSE because the value in cell A6 is equal to the value in cell B6. Let’s see how the operator works in Excel with some formulas and examples.Īs you can see below, the formula in cell C5 returns TRUE because the value in cell A5 is not equal to the value in cell B5. value_1 – the first value to be compared.How to Use the ‘Not Equal to’ Comparison Operator in Excel Now let’s see how we can use ‘Not Equal to’ in Excel. The Not Equal operator is often used along with other conditional functions such as IF, OR, SUMIF, COUNTIF functions to create formulas. If the values are NOT equal, it will return TRUE, else it will return FALSE. The is a comparison operator that compares two values. It is also known as a Boolean operator because the resulting output of any calculation with this operator can only be either TRUE or FALSE. ‘Not equal to’ operator () is one of the six logical operators available in Microsoft Excel, which helps check if one value is not equal to another.
0 Comments
Leave a Reply. |