Consulting

Results 1 to 4 of 4

Thread: Autofilter in VBA for selected string in a cell

  1. #1

    Autofilter in VBA for selected string in a cell

    Hi All,

    I Hope you all could help me on this.

    As you could see in attached xls file, I need to filter out only those columns which have their string value as "john".
    Autofilter can be applied if the complete string is "john". But here its a part of string and so I couldn't do it with autofilter option. Is it possible to apply autofilter in this scenario? If not, could you please guide me on how to apply this functionality?

    Thanks,
    Madan

  2. #2
    VBAX Tutor
    Joined
    Nov 2006
    Location
    North East Pennsylvania, USA
    Posts
    203
    Location
    Madan,

    Welcome to the VBA Express forum.


    Highlite the data in column D, range D110
    Click on Data, Filter
    Click on the down arrow in cell D1
    Click on Text Filters
    Click on Contains…
    In the box to the right of contains, type in john
    Click on the OK button

  3. #3
    Hello Stanley,

    Thanks for your help.

    Can you let me know if this can be done in VBA macros (back-end)?
    If possible, post the source code for this change also.

    Many Thanks,
    Madan

  4. #4
    VBAX Tutor
    Joined
    Nov 2006
    Location
    North East Pennsylvania, USA
    Posts
    203
    Location
    Madan,

    Detach/open workbook VBAX Newbie - VE3530 - SDG10.xlsm and run macro FilterContainsjohn.


    Have a great day,
    Stan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •