+ Reply to Thread
Results 1 to 4 of 4

[SOLVED]Hide Rows and Columns Based on User Input

  1. #1
    Registered User
    Join Date
    01-25-2013
    Location
    Vermont, Dakota
    MS-Off Ver
    Excel 2007
    Posts
    22

    Cool [SOLVED]Hide Rows and Columns Based on User Input

    Hi all,

    I'm running into an issue in trying to hide rows based on the input in one cell and hide columns based on the input in the other. Thus far I have only managed to make hiding the rows work as I intended. The code for that is below. How can I also hide columns K:S if "G15" = 1, L:S if "G15" = 2, ... S:S if "G15" = 9? Sorry if this wasn't the most clear.


    Please Login or Register  to view this content.
    Last edited by thesteve; 02-04-2013 at 11:07 AM. Reason: solved

  2. #2
    Registered User
    Join Date
    10-04-2012
    Location
    US
    MS-Off Ver
    Word, Excel, Access all 2007 & 2010. Outlook 2010
    Posts
    56

    Lightbulb Re: Hide Rows and Columns Based on User Input

    Hi there! I would say that you could easily add a new Select...Case block but that would also need some tweaks to the If...Then logic and simply too many lines of code for my taste. I think this may be easy enough to follow but what's more, it simply works the way you've asked. Oh, by-the-way, this works on the sheet that is active so it can be moved from sheet to sheet or added to a module by itself and called on when needed.

    Please Login or Register  to view this content.
    Cheers!

  3. #3
    Registered User
    Join Date
    01-25-2013
    Location
    Vermont, Dakota
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Hide Rows and Columns Based on User Input

    Thanks so much, this works perfectly as I was beginning to get worried I wouldnt ever get it done!

    I really appreciate it.

  4. #4
    Registered User
    Join Date
    10-04-2012
    Location
    US
    MS-Off Ver
    Word, Excel, Access all 2007 & 2010. Outlook 2010
    Posts
    56

    Thumbs up Re: Hide Rows and Columns Based on User Input

    Very HAPPY to help.

    I have to ask a favor, I'd do it for you but I can't; don't forget to change the title in your original post. Just click Pencil (EditPost.gif) at the bottom of post #1 and add [SOLVED] to the beginning.

    Also remember that you can click the Star (Reputation.gif) symbol in the bottom left corner of any and all posts that you considered "helpful".

    Enjoy!
    K

+ 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