Forum Discussion

MenneW's avatar
MenneW
Copper Contributor
May 01, 2024
Solved

Filter list with OR condition

Hello Everyone,

 

I have a question about the problem above. I want to filter the numbers from list one, with condition that it is present in list one OR list two. How do I reach this?

 

  • MenneW 

    =FILTER(A2:A22,BYROW(A2:A22,LAMBDA(r,COUNTIF(B2:B15,r)+COUNTIF(C2:C17,r)))=1)

     

    Alternatively you can use this formula which returns the numbers that are either in list 2 or list 3. According to the sample data the assumption is that there are no duplicates within a list.

     

6 Replies

  • MenneW 

    Did you mean "filter the numbers from list one, with condition that it is present in list two OR list three"?

    Or "filter the numbers from list three, with condition that it is present in list one OR list two"?

    Or something else?

    • MenneW's avatar
      MenneW
      Copper Contributor
      Hi Hans,
      I'm sorry I meant filter the numbers from list one, with condition that it is present in list two OR three.
      • OliverScheurich's avatar
        OliverScheurich
        Gold Contributor

        MenneW 

        =FILTER(A2:A22,BYROW(A2:A22,LAMBDA(r,COUNTIF(B2:B15,r)+COUNTIF(C2:C17,r)))=1)

         

        Alternatively you can use this formula which returns the numbers that are either in list 2 or list 3. According to the sample data the assumption is that there are no duplicates within a list.

         

Resources