Getting #DIV/0! in Microsoft Excel spreadsheet
When working with an Excel spreadsheet formula that is dividing the value of two or more cells if one or more of those values either contains no value or are equal to zero. You'll get the formula result of #DIV/0! that indicates a divide by zero error. To resolve this issue do either of the below recommendations.
Do not divide by zero or non-values
The obvious solution to this issue is of course to divide only with cells that have a value not equal to zero.
Use an if formula
A more elegant solution to this problem, especially when dealing with a spreadsheet that needs empty cells is to use an "if formula" similar to the example below.
=IF(A2="","",A2/A1)
In this above example if cell A2 is equal to "" (nothing) then print nothing. Otherwise divide the cell values A2 with A1. The above example could also be modified to perform a different calculation instead of printing nothing by replacing the second "" with a formula to be carried out or other text.
No comments:
Post a Comment