A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Use an IF formula that checks whether the cell to the left contains 1, 2, and 3 at least once each.
If the list is in A2, enter this in B2:
=IF(AND(A2<>"",ISNUMBER(SEARCH("1",A2)),ISNUMBER(SEARCH("2",A2)),ISNUMBER(SEARCH("3",A2))),"Yes","No")
How it works:
-
SEARCH("1",A2)checks whether 1 exists in the cell -
SEARCH("2",A2)checks whether 2 exists -
SEARCH("3",A2)checks whether 3 exists -
AND(...)returns TRUE only if all three are found -
IF(...,"Yes","No")converts that result to Yes or No
Based on the examples shown:
-
2, 2, 3→ No -
1, 2, 2, 3→ Yes -
1, 2, 2→ No -
1, 2→ No -
1, 2, 3→ Yes
If the requirement is instead to return Yes when the cell contains any one of 1, 2, or 3, use:
=IF(OR(ISNUMBER(SEARCH("1",A2)),ISNUMBER(SEARCH("2",A2)),ISNUMBER(SEARCH("3",A2))),"Yes","No")