Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear experts,
I have a macro that simply compares dates in 2 databases, and if the dates are the same, then it cuts the row from the first database and copies it to the second workbook. The macro works very quickly at the beginning, but it gets very slow as it runs (it takes hours to go thorugh 400 rows)! Is there a way to modify the code to have it working more efficiently? Many thanks! Best regards, Valeria For i = 1 To Last_Row If Workbooks(WB1).Worksheets(1).Cells(i, Exp_Date_Column) = Date_Report Then Workbooks(WB1).Worksheets(1).Rows(i).Cut Workbooks(Montly_Report).Worksheets(WS).Rows(k) Workbooks(WB1).Worksheets(1).Rows(i).Delete i = i - 1 k = k + 1 NextRow = Application.WorksheetFunction.CountA(Range("A:A")) Last_Row = NextRow Application.CutCopyMode = False End If Next i -- Valeria |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I increase speed of arrow buttons to move from cell to cel. | Excel Discussion (Misc queries) | |||
Increase Speed of Calculations | Excel Worksheet Functions | |||
How to increase calculations speed in pivot table with calculated fields & items | Excel Discussion (Misc queries) | |||
Speed up macro | Excel Discussion (Misc queries) | |||
Using With to speed up macro | Excel Programming |