Searching for code for insertion of dynamic excel formulas
Hi,
I am trying to insert 1997 excel formulas by vba code.
I came this far..
__________________________________
Private Sub InsertFormulas()
Dim y As Integer
yy = "If(xx="";0;xx+$E$2)"
For y = 3 To 2000
Range("I" & y).Formula = yy
xx = Range("I" & CStr(y - 1))
Next y
End Sub
__________________________________
The only problem is xx in the formula, how can I program this that in
stead of XX the CELLNUMBERS (I3, I4, I5 etc) substitutes in the
formula.
I dont know how to fix this because the Excelformula is inserted as
Text.
Robert
|