Hello,
I'm creating a report to track email marketing activity. I want to have all the populated rows showing, then one blank at the bottom. When the blank one is populated, I want the next row to unhide itself from a range of hidden rows.
This is preferable to having loads of empty rows on display between the data and the totals at the bottom.
I've found this VBA on another forum and amended it very slightly to suit the cells I'm looking at, but seem to have gone wrong somewhere:
Private Sub Worksheet_Change(ByVal Target As Range)
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
If Not Application.Intersect(Range("D26:D149"), Target) Is Nothing Then
Rows(Target.Row + 1).Hidden = Target.Value = ""
End If
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
End Sub
A dummy version of the report can be found here: https://drive.google.com/file/d/0B3d...ew?usp=sharing
Any advice really appreciated!
Thanks
Matt
Bookmarks