When you add a division in a spreadsheet document, for example :
=B2/B3
If sometimes the cell B3 is not filled, there is the classic error : « #DIV/0 ! ».
You can use the statement if/else to avoid that kind of error :
=IF(B3=0;0;B2/B3)
Other link :
If-else Statements in OpenOffice Calc