Hey everyone,
I have a macro which hides cells based on cell value "0". The program is a calculator with a variety of options. Depending on the option the user selects, it will be "0" or "1" so when the copy command is clicked, it will hide the unnecessary rows.
However when it switches between the 2 sheets, it is too slow, and there is visible stutter, while the rows hide and it switches back and forth.
I previously used 5 different macro's that would be triggered depending on selection, but this resulted in too much code. I am looking for a simplistic way to have 1 code, for all options like the below.
Can anyone suggest a solution to make this process faster to minimize the screen stuttering the way it does?
I have a macro which hides cells based on cell value "0". The program is a calculator with a variety of options. Depending on the option the user selects, it will be "0" or "1" so when the copy command is clicked, it will hide the unnecessary rows.
However when it switches between the 2 sheets, it is too slow, and there is visible stutter, while the rows hide and it switches back and forth.
I previously used 5 different macro's that would be triggered depending on selection, but this resulted in too much code. I am looking for a simplistic way to have 1 code, for all options like the below.
Can anyone suggest a solution to make this process faster to minimize the screen stuttering the way it does?
Code:
Sub HideRows() Sheets("TD file notes").Select
Dim cell As Range
For Each cell In Range("A1:A63")
If Not IsEmpty(cell) Then
If cell.Value = 0 Then
cell.EntireRow.Hidden = True
Call copy
Sheets("TD Payment Calculator").Select
Range("G5").Select
End If
End If
Next
End Sub