+ Reply to Thread
Results 1 to 8 of 8

Set all filters in Workbook to exclude current month

  1. #1
    Registered User
    Join Date
    04-06-2021
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    4

    Post Set all filters in Workbook to exclude current month

    Hi

    Looking for some help, I have a workbook with several tables across several worksheets that I want to be able to set all tables to exclude the current months data. I can obviously manually go through each worksheet but is tiresome as I have to regularly switch between 'to date' data and 'to last month' data

    I have a 'remove all filters' vba as below, but cannot work out how to modify to suit. Any help would be appreciated, thank you.

    Please Login or Register  to view this content.
    Last edited by AliGW; 04-06-2021 at 05:36 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Business (Win 10 - Work) & MS 365 Subscription Insider (Win 10 - Home)
    Posts
    47,174

    Re: Set all filters in Workbook to exclude current month

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. As you are new I have done it for you today.)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,421

    Re: Set all filters in Workbook to exclude current month

    Is all the data in Tables?
    What column has the Date or Month?
    What format is the date or month column?

    Examples would help.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  4. #4
    Registered User
    Join Date
    04-06-2021
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Set all filters in Workbook to exclude current month

    Thank you for your reply.

    Is all the data in Tables?
    Yes

    What column has the Date or Month?
    Column Q

    What format is the date or month column?
    In date format i.e 06/04/2021

    Every worksheet has a table like this.
    Screenshot 2021-04-06 124745.jpg

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Business (Win 10 - Work) & MS 365 Subscription Insider (Win 10 - Home)
    Posts
    47,174

    Re: Set all filters in Workbook to exclude current month

    You will want to specify the date format (e.g. dd/mm/yyyy) as your helper is Stateside, where m/d/yyyy is the norm.

  6. #6
    Registered User
    Join Date
    04-06-2021
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Set all filters in Workbook to exclude current month

    Thanks Ali.

    Yes date format is dd/mm/yyyy

  7. #7
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,421

    Re: Set all filters in Workbook to exclude current month

    This should filter serial dates in column Q regardless of the date format as long as they are serial dates.

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    04-06-2021
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    4

    Re: Set all filters in Workbook to exclude current month

    That works perfectly!
    Thank you so much.

+ 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. VBA refresh all pivot tables in the workbook then select the current month
    By mz_h in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 08-29-2020, 02:15 AM
  2. Filling down a table to current month/date with VBA up to current month
    By atombomb99 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-12-2019, 03:34 PM
  3. Replies: 1
    Last Post: 04-29-2016, 01:28 PM
  4. Cell referencing the current month same workbook but between two worksheets
    By QuintonMcCloud in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-12-2015, 06:56 AM
  5. [SOLVED] Set PivotTable Filter to Current Day, Current Week, Current Month, or Current Year
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-30-2014, 08:31 AM
  6. [SOLVED] Macro to copy data from source workbook to target, based on current month of the year
    By D.Lovell in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-27-2014, 05:41 PM
  7. [SOLVED] Pick a cell containing current month actulas based what the current month is.
    By vanbasten007 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-10-2014, 01:17 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