To avoid the error of #DIV/0! and #Value! in your calculation result use functions IFERROR.
IFERROR returns a value you specify if a formula evaluates to an error; otherwise, returns the result of the formula. Use the IFERROR function to trap and handle errors in a formula.
In the given example, you can see anything divided by 0 gives #DIV/0! and any alphabet divided by a number given results in an error #VALUE!. Now you can see that the summation of column D leads to an error #DIV/0!.
To avoid this use IFERROR(Write your formula as you did in Column D) i.e., =IFERROR(B2/C2) and copy the same formula to the entire column.
By doing this you can see that the error in row 5 and 6 are handled by the IFERROR function and the final summation of the column is E also returns a value instead an error.
For more information on IFERROR you can reach me at Samrat.biswaas@gmail.com.