And and or statements allow us to test whether conditions A and B are either both true or if one or
the other is true.
But what if we want to test if a condition is not true.
In that case we have a tool called the not statement or using the not equal to operator as a means of
accomplishing that.
So here's an example where we want to redefine the conditions field based just on the precipitation
column in column C.
One way to do it would be to use the Not statement and say if not see two equals zero which in other
words is saying if C two is not equal to zero then value of true is what value false is dry again from
a readability standpoint it feels backwards.
That's just the way crazy Excel operates so it's got to get used to it.
The second way to accomplish the same thing in what is in my opinion a more straight forward approach
is to use the not equal to sign which just looks like a less then followed immediately by a greater
than symbol.
So I can do the exact same thing by writing if C-2 is not equal to zero value if true.
What value of false try.
And it's just a little bit cleaner syntax is more straightforward easy to comprehend and you don't introduce
these extra parentheses that you would by using the not statement.
So jumping over to excel.
What I'm basically going to do is revisit the conditions formula that we created in the last lecture
using the OR statement.
And I'm just going to basically delete that and start from scratch.
And I'm going to use a not equal to test to accomplish the same thing.
And again I'm going to use that precipitation field as my my variable is going to type equals F and
then arrow over to precipitation.
So if it's not equal to zero value of true is going to be weap.
So something's fallen out of the sky I don't know what doesn't really matter what otherwise conditions
are dry.
One parenthesis to close it.
And there you go.
So now what I'm going to do is just apply this formula it will overwrite all of my others.
And because it's relative references update properly and as you can see it maintained all of the same
values.
The one thing that did change I'm just going to undo and redo to show you is this error value in row
12.
And the reason that changed is because the OR statement that we had previously written remember was
based on precipitation type field which had returned an error because that field in turn was based on
the temperature field which has some corrupt or missing data.
In this case we've redefined the formula purely based on column H which doesn't seem to have the missing
value.
So the error disappears.
And it populates properly.
So there you go.
That's the non-statement