Hi there,
I have the following code that is working, but it is taking around 1 min to run. Is there anything I can do to improve the vba Speed?
What I am trying to do is automatically hiding blank rows (from B68 to B362) after Pasting in cell B27. This macro run for Sheet2 only (There is another different macro for Sheet1)
Much appreciated any help
I have the following code that is working, but it is taking around 1 min to run. Is there anything I can do to improve the vba Speed?
What I am trying to do is automatically hiding blank rows (from B68 to B362) after Pasting in cell B27. This macro run for Sheet2 only (There is another different macro for Sheet1)
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
' Show any hidden rows if this macro has been used
Range("68:362").EntireRow.Hidden = False
'Automate run macro if Past used in cell B27
If Intersect(Target, Range("B27")) Is Nothing Then Exit Sub
Application.ScreenUpdating = False
'Hide rows if blank
For Each cell In Range("B68:B362")
If cell.Value2 = "" Then cell.EntireRow.Hidden = True
Next cell
Application.ScreenUpdating = True
End Sub
Much appreciated any help
Last edited by a moderator: