So I don't have much for code to supply that will help you but I'll give you the code anyways.
My problem is just to do with one line -- in the line I'm trying to set a cell equal to the standard deviation of a variable range.
I need the cell to end up being a cell-reference formula so I can copy and paste it to calculate the standard deviation of many different ranges.
Goal:
set the activecell equal to the standard deviation of the range Start (my variable range) to Start.offset(vlookback * 20, 0)
However, it needs to show up in the cell as something like "STDEV(B3:B23)" so when I copy that cell and paste it across the range(B3:G90) it will match the destination formatting.
This is largely just a syntax error, thanks for the help.
These were the two ways I already tried, it's a bit messy -- I'm pretty new to this haha. Thanks again. Let me know if you have any questions.
'ActiveCell.FormulaR1C1 = "=STDEV(R[-" & vlookback & "]C[-" & n & "-1] : RC[-" & n & "-1])"
ActiveCell.Value = "=STDEV(" & start & ": " & start.Offset(vlookback * 20, 0) & ")"
Bookmarks