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
 
M

Mike H

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top