AutoQuant Level: Trainee
 Registered: 13-08-2009 Posts: 1
|
=excelfunction in loop
Hello,
I am new to VBA.
I want to use a function within a loop and reference cells location in the arguments of the function as well as the location. I know this code does not work, but I think it illustrates what I want to do:
For r = 1 To 10
Cells(r, 1).Value = Application.Yield(Cells(r, 2).Value, Cells(r, 3).Value, Cells(r, 4).Value, Cells(r, 5).Value, Cells(r, 6).Value, Cells(r, 7).Value)
Next r
I tried "=Yield(..." but how do I increment the arguments?
I tried Application.Run("Yield".., but that did not work either.
Thanks!
Ben
____________________________
Trading Strategy Automation and Consulting
|