I am trying to put the below formula into a UDF so that I can get a cumulative return when I aggregate monthly returns.
In excel the formula has to be recognized as an array so when I type it in I press Ctrl + Shift + Enter to get the {}
brackets around the formula.
Does anyone know how to do this?
I want to be able to just type in returns_calc()
and select the range that would fit into the returns variable below.
{=(PRODUCT(1+returns/100)-1)*100}
Range("A1").FormulaArray = "=(PRODUCT(1+returns/100)-1)*100"
– Scott Holtzman