+ 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
    145

    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 JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    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, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

+ 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. Need Toggle Button to hide/unhide rows based on cell value in non concurrent rows
    By The Phoenix in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-13-2015, 10:49 AM
  2. [SOLVED] First unhide all rows - then hide rows based on specific cell value for a range of cells
    By robbiekh in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-22-2013, 05:46 PM
  3. how To hide/unhide rows based on cell value
    By novice2430 in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 06-05-2013, 01:39 PM
  4. Unhide / Hide Rows Based on Cell Value
    By bradaresnick in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 03-02-2010, 10:02 AM
  5. Hide/Unhide Rows based on Zero Value
    By chiz in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-09-2010, 05:28 AM
  6. hide/unhide rows based on cell value
    By alexandruc in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 10-12-2009, 06:49 AM
  7. Optimize Dynamic Hide/Unhide Row based on mulitple cell values
    By Diggman33 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-10-2009, 09:40 AM

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