vidplaylist
Board Regular
- Joined
- Aug 3, 2011
- Messages
- 78
I want that Sheets name given in column C get hide in workbook if i write No in Column E. Similarly display Sheet in workbook if i write Yes.
Note: i have to apply this formula on this range only.
Somewhere i am doing mistake so, please help.
Sub DisplaySheetHide()
Dim Cell As Range
For Each Cell In Range("E1:E17")
If Cell.Value = "No" Then
ActiveCell.Offset(0, -2).Select
Sheets(Cell.Value).Visible = xlSheetVeryHidden
ElseIf Cell.Value = "Yes" Then
ActiveCell.Offset(0, -2).Select
Sheets(Cell.Value).Visible = xlSheetVisible
End If
Next Cell
End Sub
Note: i have to apply this formula on this range only.
Somewhere i am doing mistake so, please help.
Sub DisplaySheetHide()
Dim Cell As Range
For Each Cell In Range("E1:E17")
If Cell.Value = "No" Then
ActiveCell.Offset(0, -2).Select
Sheets(Cell.Value).Visible = xlSheetVeryHidden
ElseIf Cell.Value = "Yes" Then
ActiveCell.Offset(0, -2).Select
Sheets(Cell.Value).Visible = xlSheetVisible
End If
Next Cell
End Sub