Forum Discussion

StuLux23's avatar
StuLux23
Copper Contributor
Feb 18, 2020
Solved

Can I use wildcards with the new FILTER function

I want to be able to filter a list that contains cells with lengthy text strings in them such as "12:15 to 12:35 Meeting with (Sponsor 1) at table (2) (Delegate Request)".  I want to create a new list filtered specifically for an individual sponsor so I have tried:

 

=FILTER(D:D,V:V="*Sponsor 1")

but I get a #CALC! error

 

Is it possible to use wildcards with this function? 

19 Replies

  • Patrick2788's avatar
    Patrick2788
    Silver Contributor

    StuLux23 

    It doesn't appear wildcards are supported with FILTER (Maybe added at a later date?).

     

    The workaround:

    *Can also use SEARCH instead of FIND when case does not matter.

    • StuLux23's avatar
      StuLux23
      Copper Contributor
      Thank you, this also looks like it would work well.
      • h_baum's avatar
        h_baum
        Copper Contributor

        Since February 2022, there is a solution for filtering and using wildcards.

        Look here:

        https://hermann-baum.de/excel/hbSort/en/xlookup.php#XVW2fi

        Greetings

        Hermann

    • StuLux23's avatar
      StuLux23
      Copper Contributor

      If I also then want to exclude any that have the text "TBC" in them how would I add that to your existing formula?

      Riny_van_Eekelen 

      • Riny_van_Eekelen's avatar
        Riny_van_Eekelen
        Platinum Contributor

        StuLux23 

        Your other question crossed my previous reply.

        =FILTER(FILTER($A$2:$A$8,ISNUMBER(SEARCH($C$1,$A$2:$A$8,1))),NOT(ISNUMBER(SEARCH("TBC",FILTER($A$2:$A$8,ISNUMBER(SEARCH($C$1,$A$2:$A$8,1))),1))))

        The formula above would Find "Sponsor 1" (in C1) but would exclude "TBC".

    • StuLux23's avatar
      StuLux23
      Copper Contributor
      Yes - that's great thanks, works just as expected.
      • Riny_van_Eekelen's avatar
        Riny_van_Eekelen
        Platinum Contributor

        StuLux23 Thanks! But, I must admit that Patrick2788 's solution is neater. No need for the IFERROR part in mine. I'd prefer ISNUMBER.

         

        The formula in my file would then become:

        =FILTER($A$2:$A$8,ISNUMBER(SEARCH($C$1,$A$2:$A$8,1)))

         

Resources