Results 1 to 5 of 5

Worksheet Change Event based on value of a cell

Threaded View

  1. #4
    Registered User
    Join Date
    01-21-2011
    Location
    Maidenhead/Sheffield
    MS-Off Ver
    Excel 2003
    Posts
    57

    Re: Worksheet Change Event based on value of a cell

    This works for me.

    Private Sub Worksheet_Change(ByVal Target As Range)
        
        Dim KeyCell As Range
     
        Set KeyCell = Range("A3")
        
        If Not Application.Intersect(KeyCell, Range(Target.Address)) Is Nothing Then
     
             If KeyCell.Value = "Consolidated" Then
                Rows("27:28").Select
                Selection.EntireRow.Hidden = True
                Range("a3").Select
            
            Else
                If KeyCell.Value <> "Consolidated" Then
                Rows("27:28").Select
                Selection.EntireRow.Hidden = False
                Range("a3").Select
            End If
            End If
        End If
    End Sub
    Last edited by DonkeyOte; 01-21-2011 at 07:34 AM. Reason: CODE rather than QUOTE tags please

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