Hi
We've thousands of records using the index look-up formula
I thought i could save time by using a loop without updating the screen....however this takes longer than copying an index formula down the range...any ideas as to why this might be?
Sub macro_1()
Application.ScreenUpdating = False
Dim i As Integer
For i = 6 To 25000
Cells(i, 3).Select
ActiveCell.FormulaR1C1 = _
"=INDEX(R3C[2]:R65000C[3],MATCH(RC[-1],R3C[2]:R65000C[2],0),2)"
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Next i
End Sub
We've thousands of records using the index look-up formula
I thought i could save time by using a loop without updating the screen....however this takes longer than copying an index formula down the range...any ideas as to why this might be?
Sub macro_1()
Application.ScreenUpdating = False
Dim i As Integer
For i = 6 To 25000
Cells(i, 3).Select
ActiveCell.FormulaR1C1 = _
"=INDEX(R3C[2]:R65000C[3],MATCH(RC[-1],R3C[2]:R65000C[2],0),2)"
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Next i
End Sub