kashif.special2005
Active Member
- Joined
- Oct 26, 2009
- Messages
- 443
Hi,
In a large data I am applying formula in a column through vba, and it is taking lot of time to fetch data, please help me how can I optimize this code, so the code can run fast.
Thanks
Kashif
In a large data I am applying formula in a column through vba, and it is taking lot of time to fetch data, please help me how can I optimize this code, so the code can run fast.
Code:
For i = 2 To 480000
'Cells(i, 10).Select
Cells(i, 10).Formula = "=vlookup(A2,'2G_NSC RF Data'!A:F,2,0)"
If IsError(Cells(i, 10).Value) Then
Cells(i, 10).Formula = "=vlookup(A2,'A_BTS'!A:J,6,0)"
End If
If IsError(Cells(i, 10).Value) Then
Cells(i, 10).Formula = "=vlookup(A2,'2G All Vendor Dump'!A:J,8,0)"
End If
If IsError(Cells(i, 10).Value) Then
If Cells(i, 3) = "" Then
Cells(i, 3) = "Either Source/Target Cell Data Not Found"
End If
End If
Next i
Thanks
Kashif