I have a bit of code that I used a while back but need to tweak it. The code currently works well and hides the blank rows at the bottom of a single column range. This is what I need now:
-I want the code to look at the data in BOTH columns C and D. Then hide the rows that are below the last line whether its in column C or D. I have tried just changing the Range in the code but that doesn't seem to work. Any help would be great.
Thanks
Rob
![]()
Dim rng As Range Range("C5:C30").EntireRow.Hidden = False For Each ce In Range("C5:C30") If IsEmpty(ce) Then If rng Is Nothing Then Set rng = ce Else Set rng = Union(rng, ce) End If End If Next ce rng.EntireRow.Hidden = True
Bookmarks