How to check if a value exists within a comma-separated list in an Excel cell?
In Excel, you may need to determine whether a specific value exists within a cell containing a comma-separated list, such as Sales,123,AAA. This guide explains a simple formula-based method to quickly check for the presence of a value and return a result indicating "Yes" or "No."
Check if a value exists in a comma-separated list in an Excel cell with a formula
Check if a value exists in a comma-separated list in an Excel cell with a formula
The following formula can help you find a value in a cell with a comma-separated list in Excel. Please do as follows.
1. Select a blank cell, enter the formula =IF(ISNUMBER(SEARCH(123,A2)),"yes","no") into the Formula Bar and then press the Enter key. See screenshot:
Note: In the formula, A2 is the cell containing the comma-separated values you want to check.
2. Keep selecting the result cell and drag the Fill Handle down to get all results. If value “123” is in the comma-separated cells, you will get the result as “Yes”; otherwise, you will get the result as “No”. See screenshot:
Related articles:
- How to find and replace all blank cells with certain number or text in Excel?
- How to replace commas with newlines (Alt + Enter) in cells in Excel?
- How to split comma separated values into rows or columns in Excel?
- How to add comma at end of cell/text in Excel?
- How to remove all commas in Excel?
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!