Results 1 to 5 of 5

Thread: automatically hide/unhide the row based another sheet cell value.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    VBAX Expert Logit's Avatar
    Joined
    Sep 2016
    Posts
    623
    Location
    .
    The macro works, when you type anything - anywhere in the sheet.

    An alternative would be to use a Command Button and place the macro into a Routine Module. Then when you want to hide
    all the non-Yes rows, you click the button. See attached file.

    Option Explicit
    
    
    Sub HideNotYes()
    
    
    Application.ScreenUpdating = False
    Dim C As Range
    
    
        For Each C In Range("E3:E101").Cells
            If C.Value <> "Yes" Then
                C.EntireRow.Hidden = True
            Else
                C.EntireRow.Hidden = False
            End If
        Next C
        
    Application.ScreenUpdating = True
    
    
    End Sub
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •