+ Reply to Thread
Results 1 to 6 of 6

Hide any rows 5 through 16 in which column H is blank

  1. #1
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    134

    Hide any rows 5 through 16 in which column H is blank

    I have a spreadsheet that has data in columns a through J, cells 5 through 16. I want to create a macro to hide a row within that area in which column H is blank. TIA!

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Hide any rows 5 through 16 in which column H is blank

    Hi, Triscia,

    if the cells are blank (no formulas):
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    134

    Re: Hide any rows 5 through 16 in which column H is blank

    Awesome. Thank you. Is there another code to add to unhide them. TIA!

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Hide any rows 5 through 16 in which column H is blank

    Hi, Triscia,

    of course (weŽll stay with one line of code):
    Please Login or Register  to view this content.
    No Error handling necessary for this one.

    Ciao,
    Holger

  5. #5
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    134

    Re: Hide any rows 5 through 16 in which column H is blank

    Thanks for the quick response, but I have one more question that is kind of multiple. I am really trying to hide multiple rows in different locations within this document. I actually have a title called Statement of condition and any cells H5:h16 that are blank I want hidden, which that worked, but I have other titles in the same worksheet that I want to hide using the same, if column H is blank. So all in all I want to hide any blank cells in column h from H5:h16, again from h19:h38 and again at h41:h54. There are a total of 12 different places that I want to do this at. Is this something that can be done. Thank you so much for your help!

  6. #6
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Hide any rows 5 through 16 in which column H is blank

    Hi, Triscia,

    this is just one way to maybe solve this:
    Please Login or Register  to view this content.
    This code will take the areas one by one and try to hide empty cells. If none are in the area a MessageBox will you inform you about that. Please note that this code will take action on the active sheet in the workbook.

    To show all rows you may use
    Please Login or Register  to view this content.
    Ciao,
    Holger

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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