+ Reply to Thread
Results 1 to 3 of 3

Hide Columns Based on Values Referenced from Separate Worksheet

  1. #1
    Registered User
    Join Date
    11-04-2012
    Location
    Perth, AU
    MS-Off Ver
    Excel 2007
    Posts
    13

    Hide Columns Based on Values Referenced from Separate Worksheet

    Hello World!

    I am designing a template that will create a budget report for projects. The user will open the workbook template and enter in requested data including a start date and end date for their project. The template by default will list months from Jan-13 to Jun-20 (in mmm-yy format) and additional project information on a separate sheet titled TABLE. The date range is entered in by the user on a sheet titled DATERANGE (also in mmm-yy format). The macro I am working on should hide any columns on TABLE sheet with dates outside the entered date range on the DATERANGE sheet.

    Here is the code I have so far. It does not work; I do not know how to use Objects:
    Please Login or Register  to view this content.
    Can the code perform both > and < operations at once?

    Any help with this or a point in the right direction to a documented walkthrough would be sincerely appreciated.

    I have attached a very simple example of how the workbook will look as I'm sure my description isn't very helpful.
    daterange.xlsx

  2. #2
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Hide Columns Based on Values Referenced from Separate Worksheet

    Hi xkittenxx
    try it
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-04-2012
    Location
    Perth, AU
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Hide Columns Based on Values Referenced from Separate Worksheet

    Brilliant Nilem!

    Had to tweak the code slightly to include values entered into DATERANGE!B4.
    Please Login or Register  to view this content.
    Again, many many thanks!

+ 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