Hello,
I wonder if I could get some help with this one please.
I am running the code below to hide rows in 14 areas of a sheet that don't have entries in their column E. It works but takes a long time to run (about 8 seconds)....as you can probably tell from the code I'm pretty new to VBA!
Does anybody have any suggestions for speeding it up? In an ideal world I'd like it to run fast enough that it can execute when the sheet in question is opened but probably needs to be <2-3 seconds for that otherwise users will get annoyed.
Any help is much appreciated.
Best regards,
Iain
I wonder if I could get some help with this one please.
I am running the code below to hide rows in 14 areas of a sheet that don't have entries in their column E. It works but takes a long time to run (about 8 seconds)....as you can probably tell from the code I'm pretty new to VBA!
Does anybody have any suggestions for speeding it up? In an ideal world I'd like it to run fast enough that it can execute when the sheet in question is opened but probably needs to be <2-3 seconds for that otherwise users will get annoyed.
Any help is much appreciated.
Best regards,
Iain
VBA Code:
Sub macroBIGTIDY()
ActiveSheet.Unprotect
Application.ScreenUpdating = False
Dim Cl As Range
For Each Cl In Range("e1447:e1475,e1419:e1437, e1347:e1375,e1319:e1337, e1247:e1275,e1219:e1237, e1119:e1137,e1147:e1175, e1019:e1037,e1047:e1075, e919:e937,e947:e975, e819:e837,e847:e875, e719:e737,e747:e775, e619:e637,e647:e675")
If (Cl.Value = "") Then
Cl.EntireRow.Hidden = True
End If
Next
For Each Cl In Range("e519:e537,e547:e575, e419:e437,e447:e475, e319:e337,e347:e375, e219:e237,e247:e275, e119:e137,e147:e175")
If (Cl.Value = "") Then
Cl.EntireRow.Hidden = True
End If
Next
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
True
End Sub