You can use the following syntax in Google sheets to use an **IF** statement with the **MATCH** function:

=IF(ISNUMBER(MATCH(D2,A2:A11,0)), "Yes", "No")

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

If it does exist, then the formula returns **Yes**.

If it does not exist, then the formula returns **No**.

**Note**: Feel free to replace “Yes” and “No” with whatever other values you’d like to return.

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

**Example: How to Use IF Statement with MATCH Function in Google Sheets**

Suppose we have the following dataset in Google Sheets that contains information about various basketball players:

Suppose we would like to check if the team name **Lakers **exists in the team column.

We can type the following formula into cell **E2 **to do so:

=IF(ISNUMBER(MATCH(D2,A2:A11,0)), "Yes", "No")

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

The team name **Lakers** does exist in the range **A2:A11 **so the formula returns “Yes” in cell **E2**.

Note that you could also return a cell value instead of “Yes” or “No” in the **IF** statement.

For example, you could use the following formula to return the team name if it does exist in the team column or a blank otherwise:

=IF(ISNUMBER(MATCH(D2,A2:A11,0)), D2, " ")

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

The formula simply returns the name **Lakers** in cell **E2** because this name existed in the team column.

**Additional Resources**

The following tutorials explain how to perform other common operations in Google Sheets:

Google Sheets: Check if Cell Contains Text from List

Google Sheets: Use VLOOKUP to Return All Matches

Google Sheets: How to Use SUM with INDEX MATCH