![]() |
slow macro
I am using 2 macro for my workbook and they take very long (at least 5 mins).
Is there anyone who can help to see if there is anything to speed it up? Appreciate it. My workbook consist of many sheet, each of them requiring these 2. 1st Sub prime() Set myrange = Range("'Golden Asia Growth (D)'!Date, 'Golden Asia Growth (D)'!Price") For Each f In myrange f.Offset(, 6).Value = f.Value Next End Sub 2nd: Sub prime2() Set myrange = Range("D2:E500") For Each f In myrange f.Offset(, 3).Value = f.Value Next End Sub |
slow macro
Hi,
The 2 lines at the start and end of each sub should speed things up Application.ScreenUpdating = False Application.Calculation = xlCalculationManual 'your code Application.ScreenUpdating = True Application.Calculation = xlCalculationAutomatic -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. ":)" wrote: I am using 2 macro for my workbook and they take very long (at least 5 mins). Is there anyone who can help to see if there is anything to speed it up? Appreciate it. My workbook consist of many sheet, each of them requiring these 2. 1st Sub prime() Set myrange = Range("'Golden Asia Growth (D)'!Date, 'Golden Asia Growth (D)'!Price") For Each f In myrange f.Offset(, 6).Value = f.Value Next End Sub 2nd: Sub prime2() Set myrange = Range("D2:E500") For Each f In myrange f.Offset(, 3).Value = f.Value Next End Sub |
All times are GMT +1. The time now is 02:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com