Infinite loading time when autofilling table?

Klash Ville

Board Regular
Joined
Sep 19, 2017
Messages
83
Hello everyone, I have an issue during the autofulfillment of a table, with the following code that triggers an infinite loading time, it reaches 100% and then loops again to 0%, it's really frustating. The columns only has about 2000 rows?

Code:
    With ActiveSheet.ListObjects("Table2")
        .Range.AutoFilter Field:=.ListColumns("Found").Index, Criteria1:="<>Unknown", Operator:=xlAnd, Criteria2:="<>#N/A"
    End With
    
    Range("Table2[[#Headers],[Held Missing]]").Select
    ActiveCell.Offset(1, 0).Activate
    Do While ActiveCell.EntireRow.Hidden = True
    ActiveCell.Offset(1, 0).Activate
    Loop
    ActiveCell.FormulaR1C1 = "Held"
    Selection.Copy
    Range("Table2[Held Missing]").Select
    ActiveSheet.Paste


    With ActiveSheet.ListObjects("Table2")
        .Range.AutoFilter Field:=.ListColumns("Found").Index
    End With
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
I figured out that the loading time is NOT infinite, ALTHOUGH, it just takes a long time for him to process the hidden and visible cells and then to paste into that same visible selection. Then, it does the same all over again until the end of the table column...

And obviously I cannot work like this, someone has an alternative?
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,226
Members
452,620
Latest member
dsubash

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