This is my excel sheet:

I want to calculate the standard deviation of column c (and f) a in a 5 day window. The problem is when I start at line 14, obviously, the standard deviation of a number does not exist and then I get the result: `# div / 0!`

I want to work around this problem, but keep the formula `= STDEV (D14: D18)`

. How do I do this?

I thought of something like: if `= STDEV (D14: D18) = 0 # div / 0!`

then `= STDEV (D15: D18) otherwise = STDEV (D14: D18).

That way I preserve the formula and can drag it upwards.

Any help guys?

Many thanks!

Could you use `IFERROR()`

?

```
=IFERROR(STDEV(D14:D18),STDEV(D15:D18))
```

Tags: excelexcel