Offset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi! In column A I have a series of returns and in column B I want to
calculate the standard deviation. This is no problem. The problem is that
sometimes I want to calculate the standard deviation for 10 days rolling
return (ie 10 rows) and sometimes for a 100 days rolling return. How can I
write a formula that does this? I have a named range where I enter the number
of days that I want to use in the standard deviation calculation. Please
help!
 
Assuming data in A2 down
think you could try this in say, B2:
=STDEV(OFFSET(A2,,,Days))
where Days would be a named cell for the input: 10 or 100, etc
 
Back
Top