All right if you've arrived at this video,
you might be having a problem with #DIV/0!.
And what we're going to do we're going to go over
what causes it and how to fix it.
(cheerful music)
So I've laid out just a couple of different
small tables here, and I use these functions.
They're all doing the same thing,
but I just want to show you a few different ways
that you can get the #DIV/0!.
So our first table right here is just doing
simple division using the slash as an operator
and it's just saying C6 divided by B6.
And when you drag this formula down, when you get to B7
so we'll just do it again it's already been done,
but it gives an error in row seven.
And it's giving you that error
because it's trying to divide by zero.
So it's really conceptually pretty simple error
is doing eight divided by zero, and you can't divide by zero
so it's just returning an error.
So we'll talk about how to fix this
but before we do the exact same data is here and here
and I'll just go to view and show formulas
and show you this first table is just using
what I would call a traditional way of doing the division
the way you would typically see it is just with the slash.
But you can also use the divide function.
It's doing the exact same thing,
but depending on how you're constructing your formula,
it may make sense to use divide and also quotient.
And quotient just doesn't give you the remainder
so that does whole numbers.
So let's go back to just showing the results
and we'll talk about how to fix this.
So you're at this video also I'm assuming
because you don't wanna see divided by zero.
It's ugly and it makes it look like there's a problem.
So you can develop a way to handle this error
where it gives you kinda a more useful message
instead of that error.
So we'll just delete this formula in B7
and we'll make a new one.
What we're going to do, is we're going to use the
IFERROR function and what you need to do
is give this another function.
It will check to see if it's an error.
And if it is, it'll do one thing, if not, it'll do another.
So the IFERROR tells you it's waiting for the value.
So this would be the value that it checks to see
if there is an error.
So that's going to be C7 divided by B7.
And there you do a comma and the same value IFERROR.
So there's something wrong with it.
Let's just say, please enter a value in column B.
So instead of just saying, there's something wrong,
this message is telling the user what to do to fix it.
And then close it off because if there is no error,
We'll just go ahead and run the function.
So when I hit enter, there we go,
please enter a value in column B.
Yes, we need to fit this column
a little bit better there we go.
So we'll copy this formula
we'll put it in D6 where I know it worked,
so it won't put the message in there and how to fix it.
And we'll copy it in eight, nine too.
That same technique would work with dividing quotient.
So there's no need to show you the same thing again.
And we'll just move on to a bit more of a complex formula
and the point of this one, is to show you
how to find where the zero is coming from.
So if I double click in this,
I just made it a little bit more is going on here,
but I constructed it,
so it would still try to divide by zero.
And if you come in here and say,
where's this zero coming from?
I know all of these have values.
So what you can do, you can hold your left mouse button
and select certain parts of the formula
and then the little blue text that pops up right above
it is going to tell you what the result is.
So this isn't your zero this is coming up is one.
Let's highlight this part and there's where your zero.
So we take zero times one, it's still zero as shown by that.
And so what you need to do is address
this part of your formula that's coming up with a zero
and then you'll be fine.
And now let's talk about real simple way
to get a little calendar to pop up,
when you double click into cell.
See you in the next video.