Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Assuming you enter the number of days in A1, try this:
=IF(A10,STDEV(INDIRECT("D6:D"&A1+5)*SQRT(252),0) This returns 0 if A1 is blank - you might also want to set some maximum for A1, such as: =IF(AND(A10,A1<100),STDEV(INDIRECT("D6:D"&A1+5)*S QRT(252),0) Hope this helps. Pete On Aug 14, 12:20 am, energydoc wrote: I am calculating a rolling historical volatility for a series of commodity returns, using the following formula =STDEV(D6:D35)*SQRT(252) I want to be able to type in the # of days back to go (e.g. in the example above, it is a 30-day rolling stdev) in the cell above the top value. That is, I want to be able to type "50" into the cell and have the formula update to STDEV(D6:D55)*SQRT(252) automatically. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Interactive course | New Users to Excel | |||
Interactive Charts | Charts and Charting in Excel | |||
Interactive Forms | Excel Worksheet Functions | |||
Interactive checkboxes | Excel Discussion (Misc queries) | |||
iNTERACTIVE EXCEL FILE NOT INTERACTIVE ON THE WEB | Excel Discussion (Misc queries) |