Thanks a lot JieJenn!!! it works, but
is there a way to make it go a little faster??? it seem like it's doing one row at a time...
I have a similar macro for another project, but the difference is it hides when the cell is "blank" (and it only hides, it doesn't unhide)... I notice that it has a "Union" function in it, I think this is the key to make it go faster... is there a way you can incorporate a similar function into the code you wrote?
Dim RangeToHide As Range
Dim rRowRange As Range
Set rRowRange = Range("B4:B260")
rRowRange.EntireRow.Hidden = False
For Each rRow In rRowRange
If Len(rRow.Value) = 0 Then
If RangeToHide Is Nothing Then
Set RangeToHide = rRow
Else
Set RangeToHide = Union(RangeToHide, rRow)
End If
End If
Next rRow
If Not RangeToHide Is Nothing Then
RangeToHide.EntireRow.Hidden = True
End If
Bookmarks