Excel Formula: If Cell Equals Value from List Then


You can use the following formula in Excel to check if a cell equals a value from a list and then return some specific value if it does exist:

=IF(ISNUMBER(MATCH(A2,$D$2:$D$5,0)), "Yes", "No")

This particular formula checks if the value in cell A2 exists in the range D2:D5.

If the value does exist, then the formula returns Yes.

If the value does not exist, then the formula returns No.

The following example shows how to use this formula in practice.

Example: Excel Formula for “If Cell Equals Value from List Then”

Suppose we have a list of basketball teams in column A and another list of teams in column D that represent the teams that made the playoffs:

Suppose we would like to check if each team in column A equals a value from the list in column D and return “Yes” or “No” accordingly.

We can type the following formula in cell B2 to do so:

=IF(ISNUMBER(MATCH(A2,$D$2:$D$5,0)), "Yes", "No")

We can then click and drag this formula down to each remaining cell in column B:

Excel if cell equals value from list then

Column B displays either “Yes” or “No” to show if the corresponding team name in column A exists in column D.

Note that we could also return values other than “Yes” or “No” in the formula.

For example, we could instead use the following formula to return the team name if it exists in the playoff list of team names or a blank value otherwise:

=IF(ISNUMBER(MATCH(A2,$D$2:$D$5,0)), A2, " ")

The following screenshot shows how to use this formula in practice:

Column B displays the team name if it exists in the playoff list of teams or a blank value otherwise.

Additional Resources

The following tutorials explain how to perform other common tasks in Excel:

x
Scroll to Top