Glasgowsmile
Active Member
- Joined
- Apr 14, 2018
- Messages
- 280
- Office Version
- 365
- Platform
- Windows
Hello,
I'm trying to set up some VBA that will auto-hide cells with no values. They have formulas in them but if they return no value then I'd rather hide them.
Currently I've got this which instead of using blank cells (because I couldn't get it to work), I used a helper column with True / False. While this does work it's slow and takes a bit of time to process due to the amount of rows. How can I either improve this code below or what code would be better to achieve the same thing?
I'm trying to set up some VBA that will auto-hide cells with no values. They have formulas in them but if they return no value then I'd rather hide them.
Currently I've got this which instead of using blank cells (because I couldn't get it to work), I used a helper column with True / False. While this does work it's slow and takes a bit of time to process due to the amount of rows. How can I either improve this code below or what code would be better to achieve the same thing?
VBA Code:
Application.ScreenUpdating = False
For Each Col In Range("AU5:AU700")
If Col.Value = "False" Then
Col.EntireRow.Hidden = True
Else
Col.EntireRow.Hidden = False
End If
Next Col
Application.ScreenUpdating = True