Thread: Cumbersome Code
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim Berglund Jim Berglund is offline
external usenet poster
 
Posts: 41
Default Cumbersome Code

The following code takes a R E A L L Y long time (90 seconds), processing around 2000 records. Is there any way to speed it up?

.Columns("Y").NumberFormat = "0"
For i = 3 To (numberofRows - 2)
If .Range("CE5") = "DIST" Then
If .Cells(5, 86).Value - .Cells(i, 25).Value 0 Then
.Cells(i, 57).Value = .Cells(5, 86).Value - .Cells(i, 25).Value
Else
End If
.Cells(i, 57).Value = 0
End If
Next

Thanks,
Jim Berglund