Hi All,
I am new the forum (and macros) and was encouraged to join after struggling a few hours with the below macro! Any sugguestions are greatly appreciated.
I have been using the below macro to hide and unhide rows when a value is selected from a drop down on the same worksheet, example:
Now, I would like data in Sheet2 to hide/unhide based on the population of cell A1 on Sheet1. I've tried the below, and it is just not working for me!Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
If Target.Value = "Y" Then
Rows("11:12").EntireRow.Hidden = True
ElseIf Target.Value = "N" Then
Rows("11:12").EntireRow.Hidden = False
End If
End If
End Sub
Thank you!Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Worksheets("Sheet1").Range("$A$1") Then
If Target.Value = "Y" Then
Rows("11:12").EntireRow.Hidden = True
ElseIf Target.Value = "N" Then
Rows("11:12").EntireRow.Hidden = False
End If
End If
End Sub
Hayley
Bookmarks