+ Reply to Thread
Results 1 to 5 of 5

Need to Hide/Unhide Rows and Columns Based on Several Date Ranges

  1. #1
    Registered User
    Join Date
    03-19-2014
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Need to Hide/Unhide Rows and Columns Based on Several Date Ranges

    Hello,

    I am very new to VBA. I am building a sheet to display deadlines (rows) by project (columns). I would like to have it automatically hide the rows and columns based on the date of the deadline. If the deadline is today or 1 week from today the associated rows and columns should be visible, otherwise, I would like to hide them.

    My table is A1:N9, with A1 being a blank, row names A2:A9, and column names B1:N1.

    Any help would be greatly appreciated.

    Thank you!

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Need to Hide/Unhide Rows and Columns Based on Several Date Ranges

    it would help us a lot if you could attach a workbook with your actual layout. Put some non-sensitive data in it to show us what it looks like. It is not clear to me right now as how you data are arranged, although I can imagine. But who would loose its time to work on an assumption. Right?
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Registered User
    Join Date
    03-19-2014
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Need to Hide/Unhide Rows and Columns Based on Several Date Ranges

    sample.xlsx

    Sure - thanks for the reply!

  4. #4
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Need to Hide/Unhide Rows and Columns Based on Several Date Ranges

    Look at the attached workbook for 2 macros. One will hide or show columns and rows based on today's date. The other one will unhide all columns and rows so you can work on your table.
    Here is the code:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-19-2014
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Need to Hide/Unhide Rows and Columns Based on Several Date Ranges

    Thank you so much - that was very helpful!

+ 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. [SOLVED] Checkbox VBA - Hide/Unhide Rows and/or Columns based on cell values
    By gravy258 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-21-2013, 05:39 PM
  2. Excel Hide/Unhide Rows/Columns
    By jregan in forum Excel General
    Replies: 4
    Last Post: 08-03-2010, 11:55 AM
  3. How to hide and unhide Rows & Columns
    By Aarif in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-23-2006, 01:25 AM
  4. [SOLVED] How do I hide or unhide zero value columns/rows USING A MACRO?
    By paul in forum Excel General
    Replies: 1
    Last Post: 01-23-2006, 11:10 AM
  5. Hide / Unhide columns and rows
    By PaulM in forum Excel General
    Replies: 8
    Last Post: 12-12-2005, 11:10 PM

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