M
monkeyquant
I would like to specify a target range in a vba function for excel and
redirect the results to the target range specified at the begining
instead of using the function name, but keep givning me error, but was
okay in Sub routine.
It goes like this...
Function Alpha(yTarget As Range, Other input arguments)
''' Resize yTarget based on the results to spit out and use For loop
yTarget.Resize(m, n).name = "yTarget"
For i = 1 To m
For j = 1 to n
yTarget.Cells(i, j) = results(i, j)
Next j
Next i
I will appreciate if you can help me on this...
redirect the results to the target range specified at the begining
instead of using the function name, but keep givning me error, but was
okay in Sub routine.
It goes like this...
Function Alpha(yTarget As Range, Other input arguments)
''' Resize yTarget based on the results to spit out and use For loop
yTarget.Resize(m, n).name = "yTarget"
For i = 1 To m
For j = 1 to n
yTarget.Cells(i, j) = results(i, j)
Next j
Next i
I will appreciate if you can help me on this...