Hello All,
I’ve tried numerous approaches to this problem and the macro still works far too slowly. I am trying to develop a macro that takes the range A16:A2015 and hides the row if the cell value=1 and leaves it if the cell value=0. Ive tried the following:
Sub test()
Dim Last_Row As Long, n As Long
Application.ScreenUpdating = False
Last_Row = Range("A16").End(xlDown).Row
For n = 5 To Last_Row
If Cells(n, 6).Value = 1 Then
Cells(n, 6).EntireRow.Hidden = False
Else: Cells(n, 6).EntireRow.Hidden = True
End If
Next n
Application.ScreenUpdating = True
End Sub
But it still takes too long
I’ve tried numerous approaches to this problem and the macro still works far too slowly. I am trying to develop a macro that takes the range A16:A2015 and hides the row if the cell value=1 and leaves it if the cell value=0. Ive tried the following:
Sub test()
Dim Last_Row As Long, n As Long
Application.ScreenUpdating = False
Last_Row = Range("A16").End(xlDown).Row
For n = 5 To Last_Row
If Cells(n, 6).Value = 1 Then
Cells(n, 6).EntireRow.Hidden = False
Else: Cells(n, 6).EntireRow.Hidden = True
End If
Next n
Application.ScreenUpdating = True
End Sub
But it still takes too long