+ Reply to Thread
Results 1 to 6 of 6

Hide Row if Rows are Hidden

  1. #1
    Registered User
    Join Date
    06-14-2013
    Location
    Cincinnati, OH
    MS-Off Ver
    Excel 2013
    Posts
    9

    Hide Row if Rows are Hidden

    Can I write a VBE so that (for example)

    If Rows 10:20 are hidden,
    then hide Row 9

    Does anyone know how I can do this?

  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 Row if Rows are Hidden

    I am guessing there is more to the problem?

    Hiding a single sheets is as easy as right clicking the tab and clicking hide, what is the value of automating this?
    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-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Hide Row if Rows are Hidden

    Solus is right. Giving you the answer to your specific question is easy. But I highly doubt it will solve your true problem.

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-14-2013
    Location
    Cincinnati, OH
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: Hide Row if Rows are Hidden

    RG WORKING_3.xlsm

    I have a range of cells that pull from a separate sheet. When the row returns a blank, I have code to hide that row.

    Between sections of rows there is a gray "divider" row. If everything in the section returns a blank all of the rows in the section will be hidden. If all the whole section is hidden, then I want the divider row to hide as well. I'm attaching my workbook for reference. See the "Tracking" Sheet.

    Thank you!

  5. #5
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Hide Row if Rows are Hidden

    Replace your current HideOnEmpty macro with this one. Much faster. If it works for you feel free to click the star in the bottom left corner.

    *Note: The only way I could think of working this was based upon the color of the "grey" line. If that color changes or you choose a different but similar color in the future, it won't work.

    Please Login or Register  to view this content.
    Last edited by stnkynts; 07-22-2013 at 04:16 PM.

  6. #6
    Registered User
    Join Date
    06-14-2013
    Location
    Cincinnati, OH
    MS-Off Ver
    Excel 2013
    Posts
    9

    Re: Hide Row if Rows are Hidden

    This is awesome! Thank you so much!!!

+ 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 a row if rows below it are hidden
    By reba0729 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-18-2013, 09:19 AM
  2. [SOLVED] Extra rows being hidden in loop to hide rows
    By gtol in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-11-2013, 07:33 AM
  3. Hide checkbox when rows are hidden
    By akaempfe in forum Excel Programming / VBA / Macros
    Replies: 38
    Last Post: 10-08-2012, 01:44 PM
  4. Replies: 2
    Last Post: 07-20-2006, 02:51 PM
  5. Hide rows if rows XX are hidden
    By ph8 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-21-2005, 05:53 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