How to Check if Cell Contains Text from List in Excel
To check if a cell contains text from a list in Excel, you can use a combination of functions such as IF, ISNUMBER, and SEARCH. Here's a step-by-step guide on how to do this:
- Prepare your data: Create your list of text values in a separate column or sheet. For this example, let's assume you have a list of keywords in cells A1:A3, and you want to check if cell B1 contains any of these keywords.
Example:
A | B |
---|---|
1 | apple |
2 | banana |
3 | cherry |
- Enter the following formula in a separate cell, such as cell C1:
=IF(SUMPRODUCT(--ISNUMBER(SEARCH(A$1:A$3, B1)))>0, "Yes", "No")
- Press Enter. If cell B1 contains any of the keywords from the list, the formula will return "Yes." Otherwise, it will return "No."
In this example, cell C1 will display "Yes" because cell B1 contains the keyword "apple."
- If you want to check other cells for the presence of keywords, simply copy the formula in cell C1 and paste it into the appropriate cells.
Remember to adjust the cell references in the formula if your list of keywords or the cell you want to check is in a different location.
Did you find this useful?