tlc53
Active Member
- Joined
- Jul 26, 2018
- Messages
- 399
Hi,
Currently I have a code which unhides the row below if cell J45 is populated.
However, I would like it to unhide a block of rows. So instead of just unhiding 1 row below, it unhides 21 rows below (rows 46:66). Is there anyway to amend this code to do that?
Thanks.
Currently I have a code which unhides the row below if cell J45 is populated.
However, I would like it to unhide a block of rows. So instead of just unhiding 1 row below, it unhides 21 rows below (rows 46:66). Is there anyway to amend this code to do that?
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("J45:J45")) Is Nothing And Target.Cells.Count = 1 Then
Target.Offset(1).EntireRow.Hidden = Target.EntireRow.Hidden
End If
End Sub
Thanks.