+ Reply to Thread
Results 1 to 11 of 11

Auto Hide and Unhide Rows Based

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    09-24-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    128

    Re: Auto Hide and Unhide Rows Based

    I will have to work on this some more .. just cant seem to get the code to unhide when a value is in cell C12..

  2. #2
    Registered User
    Join Date
    12-02-2013
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Auto Hide and Unhide Rows Based

    Quote Originally Posted by moonsaga View Post
    I will have to work on this some more .. just cant seem to get the code to unhide when a value is in cell C12..
    Thanks! That's also my problem whenever a value is present in C12 it does not unhide. That is why I posted it here for possible solutions.

  3. #3
    Forum Contributor
    Join Date
    09-24-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    128

    Re: Auto Hide and Unhide Rows Based

    I think i got it working now...
    Private Sub worksheet_SelectionChange(ByVal Target As Range)
        Dim cn As Range
        Set cn = Range("C12")
        On Error GoTo endbit:
            If cn.Value = CVErr(xlErrNum) Then
             Rows("1:13").EntireRow.Hidden = True
            Exit Sub
    endbit:
            On Error Resume Next
            Rows("1:13").EntireRow.Hidden = False
    End If
    End Sub
    the above code will hide the row range when there is the #NUM! error in C12 of the Summary sheet and if there is no #NUM! error in C12 on the Summary sheet it will unhide the row range.
    I hope this works for you. let me know.

+ 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. Auto Hide/Unhide rows in Excel based on radio button selection
    By awill110 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-30-2013, 03:05 PM
  2. Auto Hide & Unhide Rows Upon Sheet Selection
    By Sleeper in forum Excel General
    Replies: 4
    Last Post: 01-24-2013, 02:00 PM
  3. Auto Hide/Unhide rows in Excel based on formula result in a column
    By crozierk in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 08-12-2012, 08:02 AM
  4. Auto hide/unhide based on input
    By UnSpoknOne in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-03-2011, 06:11 PM
  5. Auto Hide or Unhide rows.
    By Michael S in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-19-2009, 06:04 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