+ Reply to Thread
Results 1 to 2 of 2

Trying to "Reset" advanced filter on multiple sheets with one button.

  1. #1
    Registered User
    Join Date
    07-23-2019
    Location
    TN
    MS-Off Ver
    2016
    Posts
    38

    Trying to "Reset" advanced filter on multiple sheets with one button.

    I have followed a gentleman's directions at: https://www.onlinepclearning.com/exc...iple-criteria/ on creating my setup and it works extremely well however in his provided information he resets the data only on the sheet he is working on. I have created several sheets using the same data filter but I can not figure out how to reset the data on all corresponding sheets. It will only clear the data on the original or first sheet. Here is the code i am using:

    Sub SearchSheet()
    '
    ' SearchSheet Macro
    '

    '
    Application.CutCopyMode = False
    Sheet2.Range("A3").CurrentRegion.AdvancedFilter Action:=xlFilterCopy, _
    CriteriaRange:=Sheet3.Range("AB7:AE8"), CopyToRange:=Sheet3.Range("A5:S5"), Unique:=False
    Application.CutCopyMode = False
    Sheet2.Range("A3").CurrentRegion.AdvancedFilter Action:=xlFilterCopy, _
    CriteriaRange:=Sheet3.Range("AB7:AD8"), CopyToRange:=Sheet6.Range("A6:S6"), Unique:=False
    End Sub


    Sub ClearSheet()
    '
    ' ClearSheet Macro
    '

    '
    Application.Run "'Bact-T Master Sheet(Original)3A.xlsm'!Recalc"
    Range("A6:S15000").Select
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    Selection.Borders(xlEdgeLeft).LineStyle = xlNone
    Selection.Borders(xlEdgeTop).LineStyle = xlNone
    Selection.Borders(xlEdgeBottom).LineStyle = xlNone
    Selection.Borders(xlEdgeRight).LineStyle = xlNone
    Selection.Borders(xlInsideVertical).LineStyle = xlNone
    Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
    Selection.ClearContents
    Application.Run "'Bact-T Master Sheet(Original)3A.xlsm'!Recalc"
    Range("E3:L3").Select
    Selection.ClearContents


    End Sub

    I am mediocre with VBA but I think my issue is that in the ClearSheet macro there has no identified range. It doesnt individualize the sheet or cells to be cleared. I want to reset the data from one button. Any help would be greatly appreciated thanks in advance.

  2. #2
    Registered User
    Join Date
    07-23-2019
    Location
    TN
    MS-Off Ver
    2016
    Posts
    38

    Re: Trying to "Reset" advanced filter on multiple sheets with one button.

    Sorry I did not post a template of my data but here is a small sample.
    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)

Similar Threads

  1. advanced and complex "fuzzy" filter on multiple criteria
    By Ebru in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-03-2016, 03:11 PM
  2. Replies: 7
    Last Post: 03-17-2014, 01:51 PM
  3. advanced filter - button to re apply advanced filter across multiple sheets
    By motmac87 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2013, 11:16 PM
  4. advanced filter criteria "begins with" and "does not begin with"
    By Eddie O in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-06-2005, 12:05 PM
  5. [SOLVED] advanced filter criteria "begins with" and "does not begin with":how can use all 3 cr
    By raph_baril in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-28-2005, 06:05 PM
  6. "Criteria Range" in the "Data/Filter/Advanced Filter" to select Du
    By TC in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-11-2005, 10:06 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