+ Reply to Thread
Results 1 to 2 of 2

Hide/UnHide Rows Based on Dynamic Start/End Dates

  1. #1
    Forum Contributor
    Join Date
    05-13-2012
    Location
    Eagle River, Alaska
    MS-Off Ver
    Excel 2010
    Posts
    135

    Hide/UnHide Rows Based on Dynamic Start/End Dates

    I can't seem to find in any posts I have searched how to build syntax to reference a dynamic start date (example: NOW -10). I can see how to incorporate the end date using NOW. My file has column A1 with dates starting with 1/1/2019 and goes to A365 with 12/31/2019. I want to "see" rows corresponding to the last 10 days (dynamic). My file is also attached. Thanks for your help!

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    1,243

    Re: Hide/UnHide Rows Based on Dynamic Start/End Dates

    You can do that pretty easy with a filter. The code below uses the Worksheet_Activate event to trigger the macro.

    Please Login or Register  to view this content.
    copy the code to the worksheet code module. When the sheet is activated, it will filter the last ten days .
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, click the 'Go Advanced' button, Then click 'Manage Attachements' and follow the menu.

+ 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