Home » excel » Excel formula with `#div/0!` to calculate Std. Devaiation

Excel formula with `#div/0!` to calculate Std. Devaiation

Posted by: admin May 14, 2020 Leave a comment

Questions:

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!

How to&Answers:

Could you use IFERROR()?

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