Table of Contents
The IF statement in Excel allows users to perform a logical test and specify different actions based on the result. It can be combined with the MATCH function, which searches for a specific value in a range of cells and returns its position. This combination enables users to create more complex and dynamic formulas, where the outcome is determined by both the logical test and the lookup value. By using the IF statement with the MATCH function, users can efficiently handle different scenarios and perform calculations based on specific criteria. This functionality is particularly useful in data analysis and decision-making processes, as it allows for customized and automated responses to various situations.
Excel: Use IF Statement with MATCH Function
You can use the following syntax in Excel to use an IF statement with the MATCH function:
=IF(ISNUMBER(MATCH(E2,A2:A10,0)), "Yes", "No")
This particular formula checks if the value in cell E2 exists in the range A2:A10.
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 Excel
Suppose we have the following dataset in Excel 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 F2 to do so:
=IF(ISNUMBER(MATCH(E2,A2:A10,0)), "Yes", "No")
The following screenshot shows how to use this formula in practice:

The team name “Lakers” does exist in the range A2:A10 so the formula returns “Yes” in cell F2.
Note that you could also return a cell value instead of “Yes” or “No” in the IF statement.
=IF(ISNUMBER(MATCH(E2,A2:A10,0)), E2, " ")
The following screenshot shows how to use this formula in practice:

The formula simply returns the name “Lakers” in cell F2 because this name existed in the team column.
The following tutorials explain how to perform other common operations in Excel:
Cite this article
stats writer (2024). How can I use an IF statement with the MATCH function in Excel?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-use-an-if-statement-with-the-match-function-in-excel/
stats writer. "How can I use an IF statement with the MATCH function in Excel?." PSYCHOLOGICAL SCALES, 22 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-use-an-if-statement-with-the-match-function-in-excel/.
stats writer. "How can I use an IF statement with the MATCH function in Excel?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-use-an-if-statement-with-the-match-function-in-excel/.
stats writer (2024) 'How can I use an IF statement with the MATCH function in Excel?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-use-an-if-statement-with-the-match-function-in-excel/.
[1] stats writer, "How can I use an IF statement with the MATCH function in Excel?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.
stats writer. How can I use an IF statement with the MATCH function in Excel?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
