Hide Row on cell value - TOO SLOW- SCREEN STUTTERS AND PIXILATES

hensleyj

New Member
Joined
Apr 2, 2012
Messages
39
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?

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
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
try this

Code:
Sub HideRows()    Sheets("TD file notes").Select
    Dim cell As Range

Application.screenupdating=false
    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 
Application.Screenupdating=true
[COLOR=#333333]End Sub
[/COLOR]
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,559
Messages
6,120,208
Members
448,951
Latest member
jennlynn

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top