Formulas



The If Function





The IF statement is a super useful thing we call a conditional statement.

These statements let you do different stuff evaluated on a true or false.

Without writing too much, let us use a little diagram...





Let's assume if it is not unlocked it is locked!

Not broken, missing, rusted, invisible, or nuffin..


Ah ha! But what if it is already locked?

If that's the case then we can tell it to do something else!


For example, test the lock make sure, or walk away cause you're satisfied.





Now how does this apply in Excel?

The way it works is described in the infographic below.





The IF Function takes 3 parameters.

The first is the IF itself, in this case it is if a cell value equals something specific.

We set a case for if the condition is met and a backup case if it isn't.

The picture below shows if the condition is NOT met, poor guys.







Let's see it in action already........







This GIF shows you how easy it can be to assign grades with an IF statement.





BONUS, the NESTED if





You handle more cases, so instead of just a pass/fail - we can assign letter grades!







‚ÄčIf the first IF doesn't pass, it defaults to the second one, and so on..


It looks like this, almost a waterfall of logic. This is called a nested IF.