+ Reply to Thread
Results 1 to 5 of 5

Advanced filtering within a workbook question using vba

  1. #1
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    968

    Advanced filtering within a workbook question using vba

    I was curious if anyone could assist me with the following issue. In my workbook on a worksheet titled "Lookup" I have a filter in cell "T1" which underneath are a list of personnel. I have other worksheets in this workbook, but ultimately I need the worksheets titled the following:"OvertimePay", "Holiday Pay", "COMP Holiday Pay", "Comp", "Vac-cash", "Comp-Cash", Sick-cash" and "Sickuse pay", all of which are similar in nature as far as layout and have the same personnel list with a filter tab in cell "A1" on there perspective sheets. What I'm looking for is coding or any other method that would automatically filter those sheets mentioned by the filter in cell "A1" when the master "Lookup" sheet is manually filtered from cell "T1". Is this possible?
    Last edited by lilsnoop; 12-18-2012 at 11:27 AM.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Advanced filtering within a workbook question using vba

    Try pasting the following into the ThisWorkbook tab in the VBA editor (Alt F11)

    Please Login or Register  to view this content.
    Remember to save the workbook as a .xlsm
    Martin

  3. #3
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    968

    Re: Advanced filtering within a workbook question using vba

    mrice-Thanks for looking at this issue for me. Your code did filter all of my pages in the workbook, but when I go back to my "Lookup" sheet and unfilter I get an debugging error and the other sheets will not return back to their unfiltered state.

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Advanced filtering within a workbook question using vba

    OK - need a slightly more elaborate version

    Please Login or Register  to view this content.
    Note that this only picks the first selected item - not a problem if you only select one.

  5. #5
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2016
    Posts
    968

    Re: Advanced filtering within a workbook question using vba

    Excellent! Thanks so much!

+ 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