+ Reply to Thread
Results 1 to 8 of 8

Hide Rows Based on Cell Value

  1. #1
    Registered User
    Join Date
    02-10-2014
    Location
    Cleveland, OH
    MS-Off Ver
    Excel 2007
    Posts
    51

    Hide Rows Based on Cell Value

    I'm looking for a macros that will allow the user to type in the number of subscribers (1 - 20) and then based on that number, have rows hide accordingly.

    For example: C1 = 2, then rows 49-461 hide. C1 = 5, then rows 118-461 hide.


    Any help would be greatly appreciated! I've been trying to work on this all morning and I just can't seem to get it right.

    Macro.xlsm

  2. #2
    Registered User
    Join Date
    01-13-2014
    Location
    Pensacola, USA
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Hide Rows Based on Cell Value

    I just recently did something similar, I got it working with your sheet as well, you can check the code out and modify it to your needs.

    Macro.xlsm

  3. #3
    Registered User
    Join Date
    02-10-2014
    Location
    Cleveland, OH
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Hide Rows Based on Cell Value

    jwats -
    Nothing changes when I type a number into cell C1.

  4. #4
    Registered User
    Join Date
    01-13-2014
    Location
    Pensacola, USA
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Hide Rows Based on Cell Value

    Check again, enter a 1 or 2 in C1, and look down at the rows in the 30-45 range, they will be hidden and unhide. Open up VBA and you can see my code and see what its changing, you just need to add the rest of your possible customer combinations and rows you want to actually hide. It will make sense when you look at the code

  5. #5
    Registered User
    Join Date
    02-10-2014
    Location
    Cleveland, OH
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Hide Rows Based on Cell Value

    I double checked and I see your code, but when I enter any number into cell C1, nothing happens.

  6. #6
    Registered User
    Join Date
    02-10-2014
    Location
    Cleveland, OH
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: Hide Rows Based on Cell Value

    I double double checked - now I see it. Thanks so much! I'll adjust it accordingly.

  7. #7
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Hide Rows Based on Cell Value

    Here's another version of the code for what it's worth. It should work for all 20 Subscribers.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  8. #8
    Registered User
    Join Date
    01-13-2014
    Location
    Pensacola, USA
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Hide Rows Based on Cell Value

    Quote Originally Posted by GoGoeGo View Post
    I double double checked - now I see it. Thanks so much! I'll adjust it accordingly.
    No problem, its really simple way of doing it, just make sure that the first line
    Please Login or Register  to view this content.
    you adjust to encompass the very first row and very last row you change in your Cases. So in my example I'm only touching rows between 36:45, doesn't matter the combination of them, but that I state my smallest and largest row number I plan on touching.

+ 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. Hide Rows/Hide Columns Based on Value in Cell
    By brickwall823 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2015, 02:42 PM
  2. 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
  3. Hide rows based on cell value.
    By Onweerwolf in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-31-2014, 01:31 PM
  4. Hide Rows based on Cell Value
    By klunker in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-26-2014, 10:48 AM
  5. [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
  6. [SOLVED] Hide Rows based on Cell Value
    By nogoodnames in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-21-2012, 05:39 PM
  7. [SOLVED] hide rows based on cell value
    By dummster in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 02-15-2006, 07:40 PM

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