Hi,
I have some basic code to hide some rows in my sheet, this loop takes some time to complete.
Can anyone help me with some code that will work faster?
I have some basic code to hide some rows in my sheet, this loop takes some time to complete.
Can anyone help me with some code that will work faster?
Code:
Sub Hide()
Dim i As Integer
Application.ScreenUpdating = False
For i = 18 To 1120
Cells(i, 2).Select
If Cells(i, 2).Value = 1 Then Selection.EntireRow.Hidden = True
Next i
Range("E20").Select
Application.ScreenUpdating = True
End Sub