I have a column that has a list of genomes which are special. There is another column of genomes in which some cells have multiple entries, comma-separated. What I want is to check if for each cell of the second column, is any of its entries in the first column. If the cells in second column only had one element, I could do it with =NOT(ISERROR(MATCH(B2,$A$2:$A$120,0)))
but since some query cells have muliple elements, this will not work for those. Any suggestions?
CodePudding user response:
If you need to keep the rows in the genomes column, then Separate genomes column in 3 columns and do the MATCH in 3 new columns B,C & D.
=NOT(ISERROR(MATCH(A2,$B$2:$D$120,0)))
CodePudding user response:
Try SUMPRODUCT
and SEARCH
:
=IF(SUMPRODUCT(--ISNUMBER(SEARCH(","&$A$2:$A$5&",",","&B2&","))),"Y","N")