+ Reply to Thread
Results 1 to 5 of 5

link auto-filter to different cell

  1. #1
    Registered User
    Join Date
    03-14-2013
    Location
    MALAYSIA
    MS-Off Ver
    Excel 2016
    Posts
    16

    link auto-filter to different cell

    How can we program an auto filter a table linked to a cell. For example I have a table with 4 columns (A9:D20) and the 2nd row of the sheet is the filter item (A2, B2, C2 & D2).

    Lets say column A has a list of months, column B has a list of names, column C is sales figure, column D is the customer. How can I filter let say for the total sales of Mr. X in the month of January.

    I came across a code like this but I don't know how to apply it to my sheet. Of course this code is referring to a different table and links but I just need to learn how to apply this code to my sheet:

    Activesheet.AutoFilterMode = False
    Activesheet.Range("D2:D60").AutoFilter 1, Activesheet.Range("A2").value
    AutoFilter.xlsx

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: link auto-filter to different cell

    This is really advanced filter, which uses criteria range. You may right-click your worksheet tab, then select "View code...", and copy this code there:
    Please Login or Register  to view this content.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  3. #3
    Registered User
    Join Date
    03-14-2013
    Location
    MALAYSIA
    MS-Off Ver
    Excel 2016
    Posts
    16

    Re: link auto-filter to different cell

    Izandol, is it possible to program the table to be filtered just like this one but in another sheet. Each sheet shall auto filter in the sheet and the original table is not effected and still list all the item in the original table.

  4. #4
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: link auto-filter to different cell

    If you wish to copy to a different sheet you may use:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-14-2013
    Location
    MALAYSIA
    MS-Off Ver
    Excel 2016
    Posts
    16

    Re: Filter from one table to another

    Wrong posting. Don't know how to delete this post
    Last edited by aghlab; 03-21-2014 at 06:51 AM. Reason: wrong post

+ 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] Auto Populate cell based on auto filter selection from table in same sheet
    By missydanni in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-02-2013, 05:03 PM
  2. Auto-Converting Cell Value to link & moving rows of data based on cell value
    By Th3Forgotten in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-15-2013, 08:05 AM
  3. Open xls file via URL link, and automatically filter on a switch or value in the link?
    By linksavage in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-13-2013, 02:27 PM
  4. Click cell, link to a page, filter and sort data
    By spreaderman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-12-2012, 03:47 AM
  5. Is there a way to link Auto Filter values to a Cell
    By SteveC in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-01-2006, 02:50 PM

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