A recent thread has given me the idea for this tip. The problem was to piece back together a workbook that had been split in many worksheets because of column overflow. The OP, however, insisted that it could only be restored by matching the column and row headers. I eventually accepted that.
During testing the OP mentioned that the shortened sample was taking 15 minutes to run and then it gave unexpected results - well we resolved the results issue but I realized that I could speed up the processing significantly by having the matches and placements all take place in core.
I wrote, serendipitously, the first routine using the cells method:
And the conversion to core processing was trivial - all I had to to was replace:Please Login or Register to view this content.
wc.Cells and ws.Cells with S and W respectively:
Please Login or Register to view this content.
And, should you like to try the code, the Demo File:RCMatchDemo.xlsm
Running the 2X routine plain took 48.25390625 timer units vs 42.8984375 timer units without screen updating
Running the 3X routine took 1.26953125 timer units - whatever they are (seconds???)
This is the thread
Bookmarks