Hello,
I have another problem I am not sure is possible to code around. I filter my list sometimes more than a million rows and filter out certain criteria. Then I want to copy just the visible data which is the filtered data and paste it into another sheet. The problem is the data is so large I keep getting errors. I tried to reduce the data size and address it in chunks of 100,000 lines and do it 10 times but it is insanely slow and there has to be a better way right? This is the code I am using...
'1st portion
Sheets("RAW").Select
Range("A2:Q1048576").Select
Dim rng1 As Range
Set rng1 = Application.Intersect(ActiveSheet.UsedRange, Range("A2:Q100000"))
rng1.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Sheets("Format").Select
Range("A2").Select
ActiveSheet.Paste
'2nd portion
Sheets("RAW").Select
Range("A2:Q1048576").Select
Dim rng2 As Range
Set rng2 = Application.Intersect(ActiveSheet.UsedRange, Range("A100001:Q200000"))
rng2.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Sheets("Format").Select
Range("A2").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Select
ActiveCell.Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("A2").Select
I have updated with code tags and the code does work but it takes close to 10 mins to run, I was wondering if I am doing it a really slow way and if it could be faster?
Bookmarks