How to Build Excel Comparison Expressions
A comparison expression — also known as a logical expression or a Boolean expression — is an expression in which you compare the items in a range or table column with a value you specify. In Excel, you use comparison expressions to create advanced filters for a table, as well as in functions that require criteria, such as COUNTIF, SUMIF, and AVERAGEIF.
To construct a comparison expression, you enter a comparison operator from the following table and then a value used in the comparison.
|Operator||Name||Example||What It Matches|
|=||Equals||= 100||Cells that contain the value 100|
|<>||Not equal to||<> 0||Cells that contain a value other than 0|
|>||Greater than||> 1000||Cells that contain a value greater than 1,000|
|>=||Greater than or equal to||>= 25||Cells that contain a value that’s equal to or greater than 25|
|<||Less than||< 0||Cells that contain a negative value|
|<=||Less than or equal to||<= 927||Cells that contain a value that’s equal to or less than 927|