i have below code it is taking about 13 min for 211914 rows to perform activity which is huge time to wait, due to lounge restriction I am unable to upload file as it is 6MB
is there way to make this code fast about to 10 to 15 sec!
Adeel
Code: Select all
Sub jj()
Range("h:i").ClearContents
Range("h1:i2").Clear
Dim i As Long
w = 2
e = 2
For i = 2 To Cells(Rows.Count, 3).End(xlUp).Row
If Cells(i, 3) <> "" Then
Cells(w + 1, 8) = Cells(i, 3)
w = w + 1
ElseIf Cells(i, 4) <> "" Then
Cells(e + 1, 9) = Cells(i, 4)
e = e + 1
End If
Next i
Range("H2") = "=""Ttl Num "" &COUNTA(H3:H170000)"
Range("i2") = "=""Ttl Num "" &COUNTA(i3:i170000)"
'Below Are Reserved Numbers
Range("h1:i1").Font.Bold = True
Range("h1:i1").Interior.ColorIndex = 45
Range("h1") = "Below Are Reserved Numbers"
Range("i1") = "Non Reserved"
End Sub