Hi,
This is a long one and thank you in advance for any tips/support.
I've got a few loops that basically lookup a customer number in another workbook and when its found it import x amount of cells. The workbook with the code in and the workbook it's importing the data from both have over 150 columns and around 350 rows (customers).
When I'm running it takes my bad boy work pc (8 Processors with 8gb Of Ram) over 35 minutes to run. i've put loads of application statue bar notes in so i can see where its hanging and finding the record to import is quick but its the:-
If Not Workbooks(NWB).Sheets(NWBS).Range("DU" & FREF).Value = "" Then Workbooks(TWB).Sheets("data").Range("P" & CREF) =_ CDec(Workbooks(NWB).Sheets(NWBS).Range("DU" & FREF).Value)
Workbooks(TWB).Sheets("data").Range("T" & CREF) = Workbooks(NWB).Sheets(NWBS).Range("E" & FREF)
I have lots of these and this is where its being slow. It flies through the first 60 records in around 1 minute but after that it just gets slower and slower.
I've even tried to remove lines of data once its matched to reduce the lookup but that doesn't help, it can't be to do with the new workbook growing in size because it already has the data populated.
Any info or tips of how i can improve this would be great.
Thanks again,
Scott
Bookmarks