+ Reply to Thread
Results 1 to 7 of 7

Filter Excel Table Without Referencing Table Name

  1. #1
    Forum Contributor
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    MS Office: Excel 365
    Posts
    163

    Filter Excel Table Without Referencing Table Name

    Hi --

    I have a file with a large amount of sheets and many of the sheets are virtually identical, and include a single Excel Table.
    I want to add a button to each of these 'identical' sheets to filter out the "--" values in the 'Tbl_x[Group]' column.
    Is it possible to add a single button to each sheet (all referencing a single code) that filters out this value in the "Group" column in the Active Sheet's Excel Table?
    Thank you!

    -k

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Filter Excel Table Without Referencing Table Name

    You may try something like this...

    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Contributor
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    MS Office: Excel 365
    Posts
    163

    Re: Filter Excel Table Without Referencing Table Name

    Thank you, I'll try this

    Is there a way to check if there are more than 1 list objects in a sheet?

    Your tbl is set as ws.ListObjects(1), but I'm worried I'll get an error if Excel ever registers a table 'ListObjects(2)' in a sheet.

    Thanks!

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Filter Excel Table Without Referencing Table Name

    ws.ListObjects(1) assumes that there is only one Table on every sheet and the it sets the tbl listobject.

    If you have more than one Table objects on Sheets, do you follow any specific naming convention for them? If yes, that naming convention can be utilized to set the target Table on each sheet.

  5. #5
    Forum Contributor
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    MS Office: Excel 365
    Posts
    163

    Re: Filter Excel Table Without Referencing Table Name

    I do yes --

    The main tables all begin with the same 14 characters: 'Table_Account_xxxxxxx'
    Beyond those first 14 characters, the rest of the table names can vary greatly w/o consistency.

    If any sheet were to have more than one table (which is unlikely), it's safe to say it wouldn't follow the same convention.
    So checking for these first characters should suffice when filtering on the 'Group' column in the main tables.

    Thank you

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Filter Excel Table Without Referencing Table Name

    Okay, try this...

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    11-10-2011
    Location
    New York, NY
    MS-Off Ver
    MS Office: Excel 365
    Posts
    163

    Re: Filter Excel Table Without Referencing Table Name

    Hi!

    This code seems to sort the data.
    Is there a way to modify so that the it instead filters out the "--" values?
    Thank you!

+ 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. excel chart with dynamic range referencing to a table
    By cybersource in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 01-04-2019, 07:36 AM
  2. When i do un filter a table then don't remove then filter icons from table
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-07-2017, 12:08 PM
  3. Referencing an Excel Table from a variable in VBA
    By Alpana Savarna in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-18-2014, 10:48 PM
  4. Replies: 1
    Last Post: 02-07-2014, 03:12 AM
  5. Replies: 1
    Last Post: 02-07-2014, 03:04 AM
  6. Replies: 8
    Last Post: 09-16-2013, 11:01 PM
  7. Macro Help Needed - Link Pivot Table Filter to Regular Table AutoFilter
    By ycx1129 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-11-2011, 12:54 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