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

To illustrate using the IF function with the not equal to operator, let’s examine a representative dataset. First Collection and Second Collection are columns that contain some data of various types. We will determine whether the information in one column matches the appropriate cell in the other column.

### Example 1 – Insert the Not Equal To (<>) Operator in IF Function in Excel

To check if something is not equal to another, use the Not Equal To (<>) sign in Excel.

Steps:

• Create another column titled Compare Collection throughout D.

• Select the cell D5.
• Insert the following expression in the Formula bar.

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

• Hit the Enter or Tab keys.
• You will get the intended outcome like in the image.

• Hold the AutoFill Handle icon from cell D5 and drag it to cell D10. This will copy the formula to the other cells.

Read More: Excel IF Statement Between Two Numbers

### Example 2 – Utilize the NOT Function with a Not Equal to Statement in Excel

The NOT function is a unary logical function. It returns the opposite of a given Boolean value or the logical test result.

Steps:

• Make a new column D and give it the heading Compare Collection.

• Choose the D5 cell.
• Input the following statement into the Formula bar:

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

• Hit the Enter or Tab key.

• Press and hold the AutoFill Handle, then drag it to the D10.
• This will copy the formula throughout the cells.

## Related Articles

Get FREE Advanced Excel Exercises with Solutions!
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

Advanced Excel Exercises with Solutions PDF