Hi all,
I am trying to hide a row in my "Overview" tab based on a cell value in my "Data" tab. So if cell B8 in my "Data" tab equals "Yes" then I want to hide rows 15 and 16 on my "Overview tab". I'm still fairly new to VBA. Below is what i came up with so far. Any help would be greatly appreciated.
Thanks!
I am trying to hide a row in my "Overview" tab based on a cell value in my "Data" tab. So if cell B8 in my "Data" tab equals "Yes" then I want to hide rows 15 and 16 on my "Overview tab". I'm still fairly new to VBA. Below is what i came up with so far. Any help would be greatly appreciated.
Thanks!
Code:
Sub Hiderows()
Sheets("Data").Select
If Target.Address = "$B$8" Then
If Target.Value = "Yes" Then Sheets("Overview").Select Rows("15:16").EntireRow.Hidden = True
If Target.Value = "No" Then Sheets("Overview").Select Rows("15:16").EntireRow.Hidden = False
End If
End Sub