+ Reply to Thread
Results 1 to 4 of 4

Auto Reapply Filter without VBA or Macro?

  1. #1
    Registered User
    Join Date
    12-03-2019
    Location
    Killeen, TX
    MS-Off Ver
    Office 365
    Posts
    4

    Question Auto Reapply Filter without VBA or Macro?

    Maybe this feature does not exist but I would like to know how to set my worksheet to auto-reapply filters.

    I know how to do it using a simple macro with the following code.

    Private Sub Worksheet_Change(ByVal Target As Range)

    ActiveSheet.AutoFilter.ApplyFilter

    End Sub


    However, I work in an office environment where macros are disabled by group policies. I need a workaround if one exists.

    The worksheet shows a monthly calendar for each month. I have a dropdown that allows me to select a given month. I have a filter that allows me to hide every month but the selected Month. However, I have to reapply the filter every time I choose a different month from the dropdown. Is there a way to automate the filter without macros or VBAs? Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,719

    Re: Auto Reapply Filter without VBA or Macro?

    Instead of having 12 sheets, you could just have one sheet where you select the month (and year) from a drop-down. You would need to have formulae to generate the dates (taking into account the month and year selected), but that is fairly straightforward.

    You don't explain what you use this file for, but you seem to have 7 rows for each day, so this would allow you to display up to 7 different events. Instead of putting these events directly into the calendar, you could record them on a separate sheet, and then other formulae could retrieve the data from there and display it on the calendar sheet on the appropriate day.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    12-03-2019
    Location
    Killeen, TX
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Auto Reapply Filter without VBA or Macro?

    Great minds think alike... If you click on the filter labeled hide and check the "hide" box you will see that I already have all the months on one sheet as well as formulas that generate the word "hide" based on the month and year selected. The data that is put in the cells of these filtered calendars are displayed on other sheets on the appropriate day. Essentially the same thing as your recommendation just reversed.

    The issue is having to manually select reapply after selecting the desired month from the dropdown. I understand that formulas can be set to calculate automatically or manually, but how annoying would it be if every formula had to be reapplied? Regardless, the formulas are set to automatic as the word "hide" is displayed for any month selected (other than the currently displayed month). Why the filter feature doesn't automatically hide the cells with the words "hide" is perplexing.

  4. #4
    Valued Forum Contributor
    Join Date
    11-29-2022
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    430

    Re: Auto Reapply Filter without VBA or Macro?

    I am not completely understanding what you are looking to do, but I have made similar books where I will have a dynamic date range (usually rolling 8 weeks or similar) and I want to auto filter in a Pivot table. What I do is add a helper column to the end of the data that looks something like:

    Please Login or Register  to view this content.
    And then you filter for TRUE or FALSE. As the dates change in the formulas that calculate dates (you might use TODAY() as your DataDate for instance) the formula will update to evaluate as TRUE/FALSE and your filter will follow along nicely.

+ 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. How to Automatically Reapply Filter from Another Sheet?
    By jessdaddy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-14-2021, 10:21 AM
  2. [SOLVED] Auto-reapply filter for just two column
    By Telgus in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-28-2020, 08:00 AM
  3. Auto reapply Autofilter
    By Loobrush in forum Excel General
    Replies: 9
    Last Post: 03-17-2013, 01:55 PM
  4. [SOLVED] Use VB code to reapply a filter
    By barbercabinet58 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-08-2012, 03:18 PM
  5. Replies: 0
    Last Post: 08-30-2012, 04:56 PM
  6. Replies: 0
    Last Post: 05-09-2012, 06:09 PM
  7. Automatically reapply filter based on date
    By Floris in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-30-2010, 04:12 AM

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