Solved

# Getting rid of the dreaded #DIV/0!

Posted on 2014-02-04
123 Views
When I put in a formula with a division I get #DIV/0! anytime there is a zero or null value, how can this me returned as just blank?

Sample

=SUM(J12/J13)
0
Question by:Matt Pinkston
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 19

Expert Comment

ID: 39832179
You may try to use an IF function like:

=IF(J13=0,0,J12/J13)

Sincerely,

Ed
0

LVL 50

Expert Comment

ID: 39832183
Hello,

test the values of the cells first, especially the J13 cell. Also, you don't need to wrap a division into a Sum() function.

=if(J13>0,J12/J13,"")

This formula will only undertake the division if the value in cell J13 is greater than Zero. If it is not greater than zero, it will just return an empty text value.

cheers, teylyn
0

LVL 24

Accepted Solution

Steve earned 500 total points
ID: 39832229
I would tend towards the rather handy IFERROR as this will capture more errors than just DIV0:

=IFERROR(J12/J13,"")
0

LVL 19

Expert Comment

ID: 39832230
use your formula with IFERROR like this:
=IFERROR(SUM(J12/J13);"")

see in my sample
sample.xlsx
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
###### Suggested Courses
Course of the Month2 days, 14 hours left to enroll