How can I create an Excel formula that checks if a cell equals a value from a list and returns a specific result if it does? 2

How can I create an Excel formula that checks if a cell equals a value from a list and returns a specific result if it does?

Creating an Excel formula that checks if a cell equals a value from a list and returns a specific result if it does, can be achieved by using the “IF” function in combination with the “VLOOKUP” function. The “IF” function allows you to set conditions for a cell to meet, while the “VLOOKUP” function searches a specified range for a matching value and returns a result from a corresponding cell. By combining these functions, you can create a formula that checks if a cell equals any value from a list and returns a specific result if it does. This is a useful tool for data validation and automating tasks in Excel.

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.

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

Cite this article

stats writer (2024). How can I create an Excel formula that checks if a cell equals a value from a list and returns a specific result if it does?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-create-an-excel-formula-that-checks-if-a-cell-equals-a-value-from-a-list-and-returns-a-specific-result-if-it-does/

stats writer. "How can I create an Excel formula that checks if a cell equals a value from a list and returns a specific result if it does?." PSYCHOLOGICAL SCALES, 22 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-create-an-excel-formula-that-checks-if-a-cell-equals-a-value-from-a-list-and-returns-a-specific-result-if-it-does/.

stats writer. "How can I create an Excel formula that checks if a cell equals a value from a list and returns a specific result if it does?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-create-an-excel-formula-that-checks-if-a-cell-equals-a-value-from-a-list-and-returns-a-specific-result-if-it-does/.

stats writer (2024) 'How can I create an Excel formula that checks if a cell equals a value from a list and returns a specific result if it does?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-create-an-excel-formula-that-checks-if-a-cell-equals-a-value-from-a-list-and-returns-a-specific-result-if-it-does/.

[1] stats writer, "How can I create an Excel formula that checks if a cell equals a value from a list and returns a specific result if it does?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.

stats writer. How can I create an Excel formula that checks if a cell equals a value from a list and returns a specific result if it does?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.

Download Post (.PDF)
Slide Up
x
PDF
Scroll to Top