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: 8
Default Speeding Up Code

Hey guys, any suggestions on how I can speed up this MS Excel (2003
with XP) macro? Suggestions are welcomed.

Sub TransData()
'
StartTime = Time
Application.ScreenUpdating = False
Dim BidItem As String
Sheets("Revised Rate Table").Activate
NextRow = Range("A65532").End(xlUp).Row + 1
Sheets("Rate Data").Activate
Lastbiditem = Range("A65532").End(xlUp).Row
LastCol = Range("IV2").End(xlToLeft).Column
LastCol = 20
Lastbiditem = 50
For c = 7 To LastCol
ProjectNumber = Cells(1, c).Value
For r = 2 To Lastbiditem
If Cells(r, c).Value < "" Then
Sheets("Revised Rate Table").Cells(NextRow, 2).Value = Cells(r,
2).Value
Sheets("Revised Rate Table").Cells(NextRow, 3).Value = Cells(r,
4).Value
Sheets("Revised Rate Table").Cells(NextRow, 6).Value = Cells(r,
c).Value
Sheets("Revised Rate Table").Cells(NextRow, 1).Value =
ProjectNumber
If Sheets("Revised Rate Table").Cells(NextRow, 6).Value = " "
Then
GoTo 10
ElseIf Sheets("Revised Rate Table").Cells(NextRow, 6).Value <
1 Then
Sheets("Revised Rate Table").Cells(NextRow, 6).NumberFormat
= "0.00"
ElseIf Sheets("Revised Rate Table").Cells(NextRow, 6).Value
1 Then
Sheets("Revised Rate Table").Cells(NextRow, 6).NumberFormat
= "0"
10 End If
NextRow = NextRow + 1
End If
Next r
Next c
Application.ScreenUpdating = True
EndTime = Time
MsgBox ("StartTime " & StartTime & " EndTime " & EndTime)
End Sub

 
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
Speeding Up A Spreadsheet SamuelT Excel Discussion (Misc queries) 2 June 16th 06 10:04 PM
help with speeding this up... Simon Excel Programming 16 April 26th 05 03:25 AM
speeding up vlookup Lolly[_2_] Excel Programming 2 February 16th 05 03:00 PM
Online Resources for Speeding Up Code orekin Excel Programming 1 July 8th 04 04:09 AM
speeding up a macro Brenda[_5_] Excel Programming 4 August 21st 03 12:56 AM


All times are GMT +1. The time now is 07:01 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"