+ Reply to Thread
Results 1 to 5 of 5

Macro for Hide blank rows and Unhide the rows with cells

  1. #1
    Forum Contributor Neilesh Kumar's Avatar
    Join Date
    05-26-2016
    Location
    INDIA
    MS-Off Ver
    2013 & 2016
    Posts
    842

    Macro for Hide blank rows and Unhide the rows with cells

    Hi Experts,

    I am looking for the macro for column B from Cell B1 to Cell 105 (Sheet Name is "Report 1 (CY)") where i have put the formulae but if the error found by the formula then it would be shown as blank and i would like to hide those blank rows unless the text is not appeared but if the text appears in those rows then it should unhide. Request to you kindly do provide the requested macro.

    thank you for your precious phase and valuable support.

    Regards,

    Neilesh

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Macro for Hide blank rows and Unhide the rows with cells

    Hi
    this macro hides all rows in the specified range where that row's value in column B is either an error or a blank

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor Neilesh Kumar's Avatar
    Join Date
    05-26-2016
    Location
    INDIA
    MS-Off Ver
    2013 & 2016
    Posts
    842

    Re: Macro for Hide blank rows and Unhide the rows with cells

    Quote Originally Posted by NickyC View Post
    Hi
    this macro hides all rows in the specified range where that row's value in column B is either an error or a blank

    Please Login or Register  to view this content.
    Dear Expert,

    Thank you so much for your precious support, but the provided macro is hiding the blank rows and i do required both hide the blank rows and unhide as well to the blank rows. Request to you please help me out.

    Thank you for your precious phase and valuable support.

    Regards,

    Neilesh

  4. #4
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Macro for Hide blank rows and Unhide the rows with cells

    Hi
    if you do not want to hide blank rows then try this

    Please Login or Register  to view this content.
    Last edited by alansidman; 04-14-2017 at 10:56 AM. Reason: Added code tags

  5. #5
    Forum Contributor Neilesh Kumar's Avatar
    Join Date
    05-26-2016
    Location
    INDIA
    MS-Off Ver
    2013 & 2016
    Posts
    842

    Re: Macro for Hide blank rows and Unhide the rows with cells

    Quote Originally Posted by NickyC View Post
    Hi
    if you do not want to hide blank rows then try this

    Sub hide_errors()
    Dim CCell As Range, MyRange As Range
    Set MyRange = Sheets("Report 1 (CY)").Range("B1:b105")
    MyRange.Rows.Hidden = False
    For Each CCell In Range("B1:B105").Cells
    On Error Resume Next
    If IsError(CCell) Then CCell.Rows.Hidden = True
    Next CCell
    Thanks a ton Sir. Thanks a lot.

+ 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] Hide/Unhide rows dependent on value (0 or blank)
    By masat in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-07-2016, 09:34 AM
  2. [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
  3. [SOLVED] macro to hide rows if cell is blank, unhide if it contains text
    By Russ Fuquay in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-19-2013, 10:02 PM
  4. Hide/Unhide Rows macro
    By nvalencia in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 10-08-2012, 01:44 PM
  5. [SOLVED] Hide unhide blank rows?
    By jeff p in forum Excel General
    Replies: 6
    Last Post: 04-03-2012, 09:48 AM
  6. Macro to Hide and Unhide Rows but still be able to insert rows
    By majasmi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-01-2011, 09:25 PM
  7. Excel 2007 : Hide/Unhide blank rows assigned to a check-box
    By Prof-pat-pending in forum Excel General
    Replies: 10
    Last Post: 09-05-2009, 03:50 AM

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