LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default how to reduce execution time of my code?

Experts,

I am running my macro and its taking almost 5 minutes during execution
on my computer (2GB RAM). Is there any way by which I can reduce this
execution time? Here is the code...

With wbSource.Worksheets("Flowdate")
For j = 24 To 36 Step 4
row_price = 2315

For i = 0 To 364
peak_price = .Cells(row_price, j).Value
If peak_price = "" Then
Worksheets("Flowdate").Cells(row_price, j).Value =
Worksheets("Flowdate").Cells(row_price, j).Offset(0, 2).Value
End If

offpeak_price = .Cells(row_price, j + 1).Value
If offpeak_price = "" Then
Worksheets("Flowdate").Cells(row_price, j + 1).Value =
Worksheets("Flowdate").Cells(row_price, j + 1).Offset(0, 2).Value
End If
row_price = row_price + 1
Next
MsgBox "Calculation done"
Next
End With

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I reduce repetative code leerem Excel Discussion (Misc queries) 4 August 3rd 08 12:20 PM
Any way to reduce/combine in this code? ADK Excel Programming 2 July 11th 07 03:47 PM
Reduce code Excel 2003 - SPB Excel Discussion (Misc queries) 2 May 10th 07 10:43 PM
VBA Code execution delay Raas Excel Programming 1 November 22nd 05 04:00 PM
Code execution has been interrupted Red[_4_] Excel Programming 3 October 6th 05 06:26 AM


All times are GMT +1. The time now is 08:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"