+ Reply to Thread
Results 1 to 7 of 7

Hide a range of rows based on cell values.

  1. #1
    Registered User
    Join Date
    11-25-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    61

    Hide a range of rows based on cell values.

    Hi All,
    I've been trying to put together some code to hide a range of rows on one page based on cell values on a different page. So basically Sheet1 cell A1 value is 10, A2 value is 20. When macro is run via button rows on Sheet2 from 10-20 would be hidden. The issue is the values in the cells on Sheet1 will vary. I thought something like the following would work but it doesn't. Any suggestions would be a great help. Thanks.
    Please Login or Register  to view this content.

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Hide a range of rows based on cell values.

    Perhaps
    Please Login or Register  to view this content.
    This should hide it. If the values are changed do the previously hidden rows need to be unhidden before the new values are hidden?
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Hide a range of rows based on cell values.

    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  4. #4
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Hide a range of rows based on cell values.

    Here is another option if you would like the previous hidden rows unhidden first
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-25-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Hide a range of rows based on cell values.

    Thanks Solus for the quick and very helpful reply! I had a feeling it had to do with my formatting of the "True" line.

  6. #6
    Registered User
    Join Date
    11-25-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Hide a range of rows based on cell values.

    Thanks patel45. Both yours and Solus's fixes work great!

  7. #7
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Hide a range of rows based on cell values.

    Glad to help.

    If you are satisfied with the solution please mark the thead as [SOLVED] using the thread tools at the top.

+ 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] 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
  2. Need help to show/hide rows based on values from a cell
    By concurmgr in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-19-2012, 02:56 PM
  3. [SOLVED] How to hide rows based on cell value, row range is dynamic.
    By csh8428 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-03-2012, 02:05 PM
  4. Hide Rows based on cell values
    By Chinny123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-23-2011, 08:45 AM
  5. Hide rows based on cell values
    By mlb830 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-18-2009, 05:05 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