I've got some heavily used code working and am trying to optimize it for speed.
The worksheet range is a database with a variable number of rows and columns. Each column holds one field of stock quote data such as date, open, close. Each row holds the quotes for one day. Each column of quotes to be loaded into the worksheet is in a variable length array over which I have no control ... I can not simply dim the array size to equal the range size and do a block transfer which would be extremely fast. I start at the end of the array and end of the column and iterate backward to load data until I run out of available rows in the worksheet or available quotes in the array.
1) this code transfers the data from the array to the worksheet:
2) this code clears any remaining worksheet rows for which there is no data:
2a) i've constructed this alternate to 2 which should be much faster for clearing large numbers of rows in a single operation. It compiles but I am getting a "type mismatch" error and the debugger shows that it is referencing cells based on worksheet addresses rather than range relative addresses.
Any ideas for speeding this up would be greatly appreciated.
Bookmarks