MarkCBB
Active Member
- Joined
- Apr 12, 2010
- Messages
- 497
Hi There VBA People,
I am currently using some VBA to insert this formula down 50,000 rows of data, then I copy the formulas and paste values. However I have been told that if i write the formula using proper VBA syntax it will calculate faster? and I wouldn't need to copy the results and paste them each time. Here is a sample
How would this formula look written correctly in VBA?
I am currently using some VBA to insert this formula down 50,000 rows of data, then I copy the formulas and paste values. However I have been told that if i write the formula using proper VBA syntax it will calculate faster? and I wouldn't need to copy the results and paste them each time. Here is a sample
Code:
Sub Test()
With Selection
.FormulaR1C1 = "=IFERROR(VLOOKUP(RC[-4],R1C3:R5C4,2,FALSE),"""")"
.Copy
.PasteSpecial Paste:=xlPasteValues
End With
Application.CutCopyMode = False
End Sub
How would this formula look written correctly in VBA?