I have a very simple code that works very well to Un/Hide rows when change the cell value of S55. BUT I need a code but works exactly the same for two portions of my sheet independently.
I mean changing the first cell un/hide some rows at the beggining and on the other side changing another cell at the end of the sheet un/hide others rows differents of the one at the beggining.
here is the code.
Thanks a lot for orientation!
I mean changing the first cell un/hide some rows at the beggining and on the other side changing another cell at the end of the sheet un/hide others rows differents of the one at the beggining.
here is the code.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim HideRows As Range, ViewRows As Range
If Intersect([s55], Target) Is Nothing Then Exit Sub
Select Case [s55].Value
Case Is = 0
Set HideRows = Rows("60:298")
Set ViewRows = Nothing
End Select
On Error Resume Next
HideRows.Hidden = True
ViewRows.Hidden = False
End Sub
Thanks a lot for orientation!
Last edited by a moderator: