+ Reply to Thread
Results 1 to 3 of 3

Hiding a single row in a worksheet dependng on a cell change in another worksheet

Hybrid View

bean29 Hiding a single row in a... 11-01-2012, 06:44 AM
p24leclerc Re: Hiding a single row in a... 11-02-2012, 02:26 PM
bean29 Re: Hiding a single row in a... 11-05-2012, 06:55 AM
  1. #1
    Registered User
    Join Date
    10-19-2012
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010
    Posts
    22

    Hiding a single row in a worksheet dependng on a cell change in another worksheet

    Hi All,

    I am new to the forum and would really appreciate some help with hiding rows. I am aware that there are a lot of posts relating to hiding rows and columns but I am struggling to get any of the responses I have seen to work for what I require.

    Basically I have a message box in "sheet 1" row 4, I would like the whole row to hide if the value in "sheet 2" cell H22 has "Yes" present if "" (nothing in it) then the message box in sheet 1 needs to remain visible.

    I hope I have provided enough information. oh I am using Excel 2007

    Thanks

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Hiding a single row in a worksheet dependng on a cell change in another worksheet

    Hi, here is a workbook with a macro in Sheet2 that does what you want.
    You have to create a macro that look at any changes made to Sheet2 and react only if change is made to your specific cell "H22".
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$H$22" Then
      If InStr(1, Target, "yes", vbTextCompare) <> 0 Then
        Sheets("Sheet1").Range("A4").EntireRow.Hidden = True
      Else
        Worksheets("Sheet1").Range("A4").EntireRow.Hidden = False
      End If
    End If
    End Sub
    Attached Files Attached Files
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Registered User
    Join Date
    10-19-2012
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: Hiding a single row in a worksheet dependng on a cell change in another worksheet

    This works great...thanks so much for your help

+ 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