Forum Discussion

Big_Willy's avatar
Big_Willy
Copper Contributor
Oct 18, 2023
Solved

Need a lookup that searches for a value in a column of cells that each contain multiple values

  Using the above example data, I am looking for a formula that will search all of column B for a value in column A. In the case of "22222", the lookup should return "B". In the case of "33333...
  • HansVogelaar's avatar
    HansVogelaar
    Oct 18, 2023

    Big_Willy 

    Ah - I did misinterpret your question.

    In D2:

    =XLOOKUP("*"&A2&"*",$B$2:$B$5,$C$2:$C$5,"",2)

    or

    =IFERROR(VLOOKUP("*"&A2&"*",$B$2:$C$5,2,FALSE),"")

    Fill down,

Resources