From the course: Excel: Advanced Formulas and Functions

IF function

- [Instructor] Okay, I do know that this is an advanced functions and formulas course. And yes, let's review if. Okay, it'll help us ease into the rest of the course. Here we have data, we've got our items. We have in orange, the low level amounts, and then what we have in inventory. Now, we want a column that says what's low, and what's okay. Right? Basic IF statement. Here we go. Cursor is in that first cell, equals if open parentheses, if what? Okay, what is our first logical test? And then we'll want to know, what we want the formula to do if it's true, and then if it's false, okay. So low is if the end inventory value is less than R equal to. That's important. Okay? My logical test is going to be if the low level value, is less than the In Inventory. So I got to be a little sneaky in how I get to it. I'm going to click in the cell below, and then use the up arrow to get to the cell that I want. If low level is less than the inventory level. And we actually want less than our equal to. Go to the end, comma, then double quotes, okay? Otherwise, double quotes low, double quotes, and then close the IF statement, Enter. So let's look at this. For A 1600, is okay, because yes the inventory is greater than the low level. But now let's look at W0026, 20 equals 20. That should be low because where those values are equal, that counts as low. So I'm going to go here. Now I'm going to go back, and get rid of this equal sign, and then enter. Everything updated, right. So now W0026 is right, it's showing as low. The last one W0252 is okay. Everything is good. Next, less nest an if inside an if. So, if the In inventory value is less than or equal to low level value, we want to show low. It should show, okay. If the In inventory value is greater than the low level value. And check, if the In inventory value is blank like M2115, it's blank. We don't know if that's supposed to be a zero. Are we just missing data, we don't know. Okay? Cursor in E three equals, if open parentheses. If the In inventory value, equals nothing, then check. And that has to be in double quotes. Otherwise, what? Now we want to if open parenthesis. If the In inventory, I'm going to select here, and then use the up arrow. If the In inventory value is greater than the low level value. Okay, then. Okay. Otherwise low. Again in double quotes. Close the second If statement. Now close the first If statement and Enter. Let's check the results. We've got two checks. Check is in M2115 and W0019B1212 is okay, because the 86 is greater than 75. For W0026, yep, 20 equals 20, and that's considered low. We are good. And that's the IF statement, and nesting an if, inside an if.

Contents