Robert1985
New Member
- Joined
- Jul 6, 2017
- Messages
- 3
Hi,
I have created a macro (below) to search a range and hide rows with no value, however, on running the macro it takes around a minute to run.
Is there anyway this can be sped up?
Dim xRg As Range
Application.ScreenUpdating = False
For Each xRg In Range("D1:D105")
If xRg.Value = "" Then
xRg.EntireRow.Hidden = True
Else
xRg.EntireRow.Hidden = False
End If
Next
End Sub
Thanks,
I have created a macro (below) to search a range and hide rows with no value, however, on running the macro it takes around a minute to run.
Is there anyway this can be sped up?
Dim xRg As Range
Application.ScreenUpdating = False
For Each xRg In Range("D1:D105")
If xRg.Value = "" Then
xRg.EntireRow.Hidden = True
Else
xRg.EntireRow.Hidden = False
End If
Next
End Sub
Thanks,