+ Reply to Thread
Results 1 to 2 of 2

How to filter a column in a table based on a set of values in another column

  1. #1
    Registered User
    Join Date
    06-13-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    10

    How to filter a column in a table based on a set of values in another column

    So I have a table and would like to filter the table based on values I have entered in another column. For instance, I have the table below:

    ID Value
    3---44
    2---34
    1---31
    2---31
    8---16
    3---15
    4---15
    4---12

    And in a separate column not in the table, I have this:

    1
    2
    3

    After filtering the table by the separate column, I should get this:

    ID Value
    3---44
    2---34
    1---31
    2---31
    3---15

    I know I can do this:

    Dim table1 As ListObject
    'get table object
    table1.range.AutoFilter Field:=3, Criteria1:=???

    I am not sure what to put in for criteria1. I know it needs to be an Array and I can manually enter in values like Array("1","2","3") but I need to know how to get this array of values based on a range of cells (AM23:AM184 to be exact). Everything I try results in a type mismatch.

  2. #2
    Registered User
    Join Date
    01-01-2005
    MS-Off Ver
    2007
    Posts
    368

    Re: How to filter a column in a table based on a set of values in another column

    Hi,

    See attached file.


    Elio Fernandes
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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