Reason for using the array variable is that it provides intermediate storage. Memory craps out when doing anything equivalent to a bulk copy/paste ... this appears to be entirely due to Excel's Undo stack for which I can find no "off" switch. Turning off screen updating, calculation, and events does not do it.
I need to carry cell formatting and working through an array does not carry the formatting. Also need to preserve external references which precludes use of insert/delete.
So far, the fastest method is iterating copy/paste row by row. I coded a test where I copy/pasted blocks of 10 rows at a time until I got within 10 rows of the end and it ran slower than the row by row.
Since a manual block copy/paste of all rows ran into Undo memory issues, I thought that might be the case with VB however in researching that issue, I found the following in the MS KB: "When you run a Visual Basic for Applications macro, Excel allocates no memory for undoing actions. This feature is disabled for optimization of performance when you run a macro." So I have no clue as to why copy/paste in blocks of 10 rows runs much slower than row by row.
This is what I have which is working: does not crap out on memory, retains formatting, and preserves external references:
Bookmarks