+ Reply to Thread
Results 1 to 5 of 5

Data filter from a ListBox

  1. #1
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,055

    Data filter from a ListBox

    On may occasions I've commented that I know nothing about VBA. Here's the ultimate proof.

    I have a listbox that dumps a named output into A2. I want that value to trigger a data filter in Table2 (the only Table shown on my example). When I select another value from the listbox, I need some code to ensure that the appropriate filter is applied.

    if I click "A" in the listbox, I want the Table to be filtered to show only the entries for A in column A;
    if I click E in the listbox, I want the Table to be filtered to show only the entries for E in column A;

    this is SOOOO simple, I hate asking... But that's life.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  2. #2
    Forum Contributor
    Join Date
    10-19-2012
    Location
    chennai
    MS-Off Ver
    Excel 2013
    Posts
    134

    Re: Data filter from a ListBox

    Hi welcome to forum,

    Please try the attached one(check)..

    once you got answer for your question please mark your thread as completed.
    Attached Files Attached Files

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,055

    Re: Data filter from a ListBox

    I knew it was simple. It needed a slight tweak to associate "check" with the listbox & it seems to work fine.
    I wish I knew something about VBA.

    I'll try this out on my main sheet & get back to you...

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,055

    Re: Data filter from a ListBox

    Very nearly exactly what I want. My fault for not explaining properly. The first item on the listbox should be the default, unfiltered table - showing all data. Can you amend the code in Check?

  5. #5
    Forum Contributor
    Join Date
    10-19-2012
    Location
    chennai
    MS-Off Ver
    Excel 2013
    Posts
    134

    Re: Data filter from a ListBox

    Hi gleen,

    Sorry for late reply

    Copy the given code for autofilter and in the first line make below changes and try
    Use this in the check (criteria >= "criteria")

    rajan

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Want to show name without duplicates Using FIlter Data Using ListBox
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-09-2014, 01:50 AM
  2. Filter Data to be viewed in Listbox
    By sagar.rajula in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-15-2013, 03:36 PM
  3. Use a Multiselect listbox to filter data
    By EoghanMBH in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-15-2012, 07:21 AM
  4. Replies: 1
    Last Post: 10-27-2010, 05:48 AM
  5. Filter ListBox Access data from Excel
    By carloshernandezy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-01-2006, 03:35 PM

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