+ Reply to Thread
Results 1 to 4 of 4

Filter worksheet based on listbox array

  1. #1
    Forum Contributor
    Join Date
    09-21-2009
    Location
    Belgium - Mechelen
    MS-Off Ver
    Office 365 - version 2310
    Posts
    278

    Filter worksheet based on listbox array

    Hi there ,

    I'd like to filter data ( or a Named range ) in a worksheet based on multiple selected items in a listbox on a userform.
    This is the code i use now to create a kind of array to be used in the Autofilter function.
    No error if code is run , Autofilter is activated , but i have no results.

    Can someone help me with this issue ?
    Thanks
    MarMo

    Please Login or Register  to view this content.
    Last edited by MarMo; 01-08-2013 at 08:41 AM.

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Filter worksheet based on listbox array

    hi MarMo,

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    09-21-2009
    Location
    Belgium - Mechelen
    MS-Off Ver
    Office 365 - version 2310
    Posts
    278

    Re: Filter worksheet based on listbox array

    watersev ,

    Works like a charm. Thanks for that.
    It is so great that people give a solution on this forum.

    And for my learning purposes , could you give a small explaination for the following code please ?
    Why the use of the pipe ( or vertical bar )
    I'm eager to learn new things and to write better code.

    Please Login or Register  to view this content.
    Many thanks
    MarMo

  4. #4
    Forum Contributor
    Join Date
    09-21-2009
    Location
    Belgium - Mechelen
    MS-Off Ver
    Office 365 - version 2310
    Posts
    278

    Re: Filter worksheet based on listbox array

    watersev ,

    Works like a charm. Thanks for that.
    It is so great that people give a solution on this forum.

    And for my learning purposes , could you give a small explaination for the following code please ?
    Why the use of the pipe ( or vertical bar )
    I'm eager to learn new things and to write better code.

    Please Login or Register  to view this content.
    Many thanks
    MarMo

  5. #5
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Filter worksheet based on listbox array

    you get a string delimited with pipe, after splitting it by pipe you get an array

  6. #6
    Forum Contributor
    Join Date
    09-21-2009
    Location
    Belgium - Mechelen
    MS-Off Ver
    Office 365 - version 2310
    Posts
    278

    Re: Filter worksheet based on listbox array

    watersev ,
    Thanks again for the explaination.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1