![]() |
|
#1
|
|||
|
|||
|
Hi Folks, ![]() Can anyone help with this? The current code hides rows E33:E58 and unhides one row at a time if the previous row is populated and works great, but now i need it to do the same to another set of rows too (rows E61:E86), i thought i would be able to copy the code and just change the cell address but no joy! any help would be great
)Thanks in advance Code:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Not Intersect(Target, Range("E33:E58")) Is Nothing Then
Application.ScreenUpdating = False
Dim LR As Long
LR = Range("E58").End(xlUp).Row
If Not IsEmpty(Range("E58")) Then
Range("E33:E58").EntireRow.Hidden = False
Exit Sub
End If
If Range("E58").EntireRow.Hidden = False Then
Range("E" & LR + 2, "E58").EntireRow.Hidden = True
Else
If Not IsEmpty(Target.Offset(1, 0)) Then
Target.End(xlDown).Offset(1, 0).EntireRow.Hidden = False
Else
Target.Offset(1, 0).EntireRow.Hidden = False
End If
End If
End If
End Sub]
Last edited by Pecoflyer; 03-11-2016 at 01:09 AM. Reason: Added code tags |
| Tags |
| vba |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A row that will not UNHIDE | MaineLady | Excel | 0 | 11-23-2014 01:15 PM |
VBA to keep hidden rows hidden when filtering
|
tectonicseer | Excel Programming | 1 | 07-27-2014 11:54 AM |
Unhide Projects in VBA Editor
|
Greg S. | Excel Programming | 2 | 07-24-2013 07:31 AM |
| Hide/Unhide pictures | maloneb | PowerPoint | 1 | 01-18-2012 03:34 PM |
Hidden style applied over already-hidden text.
|
christie | Word | 1 | 08-17-2011 09:10 AM |