Hello,

I'm trying to build a UDF to calculate the average return of a stock over periods of time, based solely on the stock prices each month. I built this code in order to store the individual return values in an array, and hopefully take the average of that array, however it isn't working and i'm not sure why.

ExcelProblem.jpg