grexcelman
Board Regular
- Joined
- Mar 1, 2015
- Messages
- 50
I have the following code which operates as it should, taking a text string in the adjacent cell and converting it to a formula and applying it to a few other referenced cells. I currently only have about 20 rows of data but I anticipate having nearly 1,000. The run-time is already too slow...I can only imagine how bad it would be trying to evaluate 1,000 cells. Any advice on how to convert this code into a faster function or UDF?
Code:
Sub randcalc()
Application.ScreenUpdating = False
Dim i As Long
For i = Range("D" & Rows.Count).End(xlUp).Row To 31 Step -1
Range("N" & i).Select
foutput = "=" & ActiveCell.Offset(0, -1).Range("A1").Value & "(RC[2]:RC[5])"
ActiveCell.FormulaR1C1 = foutput
Next i