ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cumbersome Code (https://www.excelbanter.com/excel-programming/317428-cumbersome-code.html)

Jim Berglund

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


All times are GMT +1. The time now is 05:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com