with your two values in A1 and B1, put this formula in C1:
Drag the formula down column C as far as there are values to be compared in columns A and B.
You didn't say if you wanted anything different if the values in A and B were the same. If you do, please respond with further information.
PS as the IF() statement is such a basic building block for formulas in Excel, I suggest you read the help file, so that you understand how it works, and how IF() statements can be nested.