tlc53
Active Member
- Joined
- Jul 26, 2018
- Messages
- 399
Hi there,
I have a set of data which can change via formulas. To reduce the amount information the user is looking at, I wanted to hide the rows with a zero balance.
I went to test the below VBA code but it was taking so long, I had to stop it. As you can see, there's over 4,000 rows. Since the data can change when other worksheets are updated, I wanted to have the rows hide/unhide automatically when the sheet is selected.
Is there another way to do this which would make it operate quicker and easier? I wasn't able to test the below code (took too long) so I'm still not sure if it works as I was wanting it to.
Any help would be appreciated. Thanks!
I have a set of data which can change via formulas. To reduce the amount information the user is looking at, I wanted to hide the rows with a zero balance.
I went to test the below VBA code but it was taking so long, I had to stop it. As you can see, there's over 4,000 rows. Since the data can change when other worksheets are updated, I wanted to have the rows hide/unhide automatically when the sheet is selected.
Is there another way to do this which would make it operate quicker and easier? I wasn't able to test the below code (took too long) so I'm still not sure if it works as I was wanting it to.
VBA Code:
Private Sub Worksheet_Activate()
Dim Cl As Range
For Each Cl In Range("L13:L4300")
Cl.EntireRow.Hidden = IIf(Cl = 0, True, False)
Next Cl
End Sub
Any help would be appreciated. Thanks!