excelexcel-formulaarray-formulas

Compare which values of array1 are present in array2


I'm trying to compare 2 arrays using this formula

=(A1:A5={"String1","String2"})

I'm getting a spilled array of 2 columns like this

5x2 array

How can I get a unique array? I've tried with =OR((A1:A5={"String1","String2"})) but I only get 1x1 array and I'd like to get a 5x1 array like this:

5x1


Solution

  • Convert the spilled array of 2 columns using this

    =BYROW(A1:B5, LAMBDA(row, OR(row)))
    

    Result