Forum Discussion

hrh_dash's avatar
hrh_dash
Iron Contributor
Sep 23, 2022
Solved

how to filter cells if cells contains specific text vba

How do i amend the code below to filter specific text such as "PTE." , "LTD.", "PRIVATE", "LIMITED", "LLP"?   Option Compare Text Sub sort () Dim ws As Worksheet Dim rng ...
  • alannavarro's avatar
    Sep 24, 2022

    hrh_dash 

    Maybe I´m wrong, the problem is that you want to filter any word that contains "PTE." , "LTD.", "PRIVATE", "LIMITED", "LLP".

    I was looking online and what I found is that you can only filter for 2 values when using wildcards.

     

    Also, find this one where they explain how to make it work. Attached is an example, hope it works.

    https://www.mrexcel.com/board/threads/wild-card-unable-to-use-in-autofilter-array.917998/

     

Resources