How to Use IF Statement with Not Equal To Operator in Excel

Microsoft Excel is a practical application. With Excel’s tools and capabilities, you can perform an endless number of operations on a dataset. Frequently, we must use the IF function in Excel. However, applying Not Equal in the If Statement logical_test is essential in many situations. This article examines two straightforward methods for applying the Not Equal Operation in If Statement. Therefore, don’t hesitate to go through these two practical examples to use the IF function with Not Equal To Statement in Excel.


Why Do We Use If Statement?

You may establish reasonable evaluations between a given result and your expectations with the help of Excel’s IF function, which is among the program’s most frequently used features. There are so two possible outcomes of an If Statement. If your evaluation holds true, you will get the first outcome. Otherwise, you will get the second result.

  • Excel’s IF expression makes it easy to sort and categorize information with minimal effort.
  • If you create a statement that compares each data input to the criteria of a specified category, Excel will automatically generate the required labeling for that type of data.

2 Suitable Examples to Use IF Statement with Not Equal To Operator in Excel

To illustrate this point, let’s examine a representative dataset. First Collection and Second Collection are columns in the following dataset. Both of the columns contain some data collections of various types. Firstly, we will develop an If Statement using the <> operator known as the Not Equal sign in Excel. Later, we will compare two collections of data using the If Statement. The second context comes up with an alternative to doing the same task with the help of the NOT function. Utilizing all these two methods, we will apply the Not Equal operation in the If Statement.

excel if statement not equal

Notes

I’ve also been using Microsoft Excel 365 to compose this post. You are free to select the version that best meets your needs. Whichever option you choose is acceptable to us.


Example 1: Insert Not Equal To (<>) Operator in IF Function in Excel

To indicate that something is not equal to another, use the Not Equal To (<>) sign in Excel. The outcomes of a not-equal comparison between two numbers are Boolean variables, which can be True or False. This context will cover how we can apply a not-equal in an Excel If Statement. To complete the work with the assistance of the Not Equal To (<>) Operator, adhere to the guidelines below.

STEPS:

  • First, create another column titled Compare Collection throughout D.

Insert Not Equal To (<>) Operator in Excel If Statement

  • Second, select the D5 cell to apply a formula.
  • To achieve this, type the following expression in the Formula bar.

=IF(B5<>C5,"Unmatched","Matched")

  • After that, hit the Enter or Tab key.
  • Subsequently, we will get the intended outcome like the below one.

Insert Not Equal To (<>) Operator in Excel If Statement

  • At this point, we have to do the same procedure to the other cells in column D.
  • To attain this, not only hold the AutoFill Handle icon but also drag it to cell D10.
  • Consequently, it will produce the desired output like the following one.

Insert Not Equal To (<>) Operator in Excel If Statement

Read More: Excel IF Statement Between Two Numbers


Example 2: Utilize NOT Function with Not Equal To Statement in Excel

The NOT function is a logical function. The procedure helps check if one value is not equal to another. The NOT function in Excel returns the opposite of a given logical or Boolean value. This section will utilize the NOT function as an alternative to applying not-equal in an Excel If Statement. Follow the directions that are provided below in order to successfully finish the work with the help of the NOT function.

STEPS:

  • First, you need to make a new column and give it the heading Compare Collection throughout D.

Utilize Excel NOT Function to Apply Not Equal in If Statement

  • Second, choose the D5 column to which you will apply a formula.
  • Input the following statement into the space provided in the Formula bar to accomplish this.

=IF(NOT(B5=C5),"Unmatched","Matched")

  • After that, you can either hit the Enter or Tab key.
  • Following that, we will arrive at the desired outcome, which will look like the illustration below.

  • At this point, we are at the stage where we need to apply the same process to the remaining cells in column D.
  • To accomplish this, the AutoFill Handle symbol must be held down and drag it to the D10
  • As a direct consequence of this, it will generate the intended output, which looks something like this:

Utilize Excel NOT Function to Apply Not Equal in If Statement

Read More: How to Check If Cell Contains One of Several Values in Excel


Download Practice Workbook

Please click the link underneath this section if you want a free copy of the illustration workbook we discussed during the demonstration.


Conclusion

From this point forward, you can use IF Function with Not Equal To Statement in Excel by following the methods we just covered. Continue utilizing them, and let us know if you have any additional ideas or other methods for finishing the assignment. Please send any queries or suggestions in the below space.


Related Articles

Get FREE Advanced Excel Exercises with Solutions!
Lutfor Rahman Shimanto
Lutfor Rahman Shimanto

Lutfor Rahman Shimanto, BSc, Information Technology, Jahangirnagar University, Bangladesh, has worked with the ExcelDemy project for over a year. He has written 50+ articles and provided solutions of 100+ comments for ExcelDemy. Currently, he works as an Excel & VBA Developer and provides support and solutions in the ExcelDemy Forum. He has solved 100+ ExcelDemy Forum problems. His work and learning interests are in developing various Excel & VBA and Desktop applications. Outside of work, he enjoys Chess... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo