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.
Read More: How to Check If Cell Contains One of Several Values in Excel
Download the Practice Workbook
Related Articles
- Prepare IF Statement Contains Multiple Words in Excel
- How to Use Wildcard with If Statement in Excel
- Show Cell Only If Value Is Greater Than 0 in Excel
- How to Use IF Function with OR and AND Statement in Excel
- How to Use If Statement Based on Cell Color in Excel
- Dynamic Data Validation List in Excel with IF Statement Condition