How to use cell references and defined names in criteria in Excel

Applies To
Excel for Microsoft 365

In Excel, you can set criteria by typing the exact value you want in the criteria cell, or by using cell references or defined names. 

Important

When you use comparison operators such as less than (<) or greater than (>) together with a cell reference or defined name, you must enclose the operator in quotation marks. Otherwise, Excel interprets the entire expression as text.

To use the value of cell D1 as the criteria, type the following formula in the criteria cell:

=$D$1

To use the value of a defined name, such as CritVar, type the following formula in the criteria cell:

=CritVar

To use operators, such as less than (<) and greater than (>), concatenate the operator with the cell reference or defined name. For example, to specify a match for a value greater than the value in cell D1, type:

=">"&$D$1

To specify a match for a value greater than or equal to the value stored in the defined name GVAR, type:

=">="&GVAR