+ Reply to Thread
Results 1 to 5 of 5

Hide columns based on a user entry

  1. #1
    Registered User
    Join Date
    03-28-2009
    Location
    Cambridge, England
    MS-Off Ver
    Excel 2007
    Posts
    10

    Hide columns based on a user entry

    Is there a way of a user can add a number in a cell and this would hide a different amount of columns.

    OR :

    Ideally I would prefer a drop down with dates and the user could select a forward date and all the columns with dates up to that would appear. This would mean they could look as far our as required and all unwanted data would be hidden.

    Many thanks
    Last edited by MarkAnderson; 03-28-2009 at 04:57 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Hide columns based on a user entry

    Yes, this is would be a Worksheet_Change macro.

    If you post up a sample of your layout or describe it in detail, I could write that for you.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Hide columns based on a user entry

    Here's a basic macro that will do what you want. Adjust the cell A1 to the cell with your "date filter" in it, can change the RNG to the column where you have those dates. Right click on the sheet-tab and VIEW CODE...paste in this macro:
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    03-28-2009
    Location
    Cambridge, England
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Hide columns based on a user entry

    Many thanks for your help, cheeers

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Hide columns based on a user entry

    If that takes care of your need, be sure to EDIT your original post (Go Advanced) and mark the PREFIX box [SOLVED]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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