Filtering the Data with Text/Number contains

  • Is there any way to filter the data by usefrom that Column "G" contains if that text or number then filter the data with this.


    as regular filter works.


    Any help will be appreciated

    Files

    • Sheet1.xlsm

      (28.6 kB, downloaded 52 times, last: )
  • Can you post a few examples of what you would enter in TextBox1 to use as the filter criteria?

    You can say "THANK YOU" for help received by clicking the :thumbup: icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

  • Sure Sir.


    I want that If Column"G" has "DLR" values i will write this text in textbox to filter the data with the given value that is "DLR"


    If i write "CoR" in Textbox then those cells which have CoR should be filtered.


    Textbox should work for both Numbers and text.


    I have type in "Text Filter" => "search" CoR this below picture result is appear.


    I want same method to filter the data with Textbox


  • Try:

    Code
    1. Private Sub CommandButton2_Click()
    2. Sheets("Sheet1").Range("B1").CurrentRegion.AutoFilter Field:=6, Criteria1:="=*" & TextBox1.Value & "*"
    3. Unload Me
    4. End Sub

    You can say "THANK YOU" for help received by clicking the :thumbup: icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.

  • You are very welcome. :)

    You can say "THANK YOU" for help received by clicking the :thumbup: icon in the bottom right corner of the helper's post.
    Practice makes perfect. I am very far from perfect so I'm still practising.