To compare two values in Excel, use the =<> (equal to not equal to) operator.