Advanced Formulas / Nested If Functions
Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.
Learn More
Subtitles of the Movie
If functions can be nested together when you have several parts of a formula that you need to test for and several different true parts that need to happen in those events. For example, an 'If' statement that's nested would start off the same way as a normal If. With this function name, open parentheses, a test, and what to do if that test is true. When this test does not prove to be true though, you have a separate test and true part. So in this case we just start the false part of the formula with another If statement. The second test and second true part go into this If statement, and the false part at the end will apply when neither of these tests has proved to be true. The formula in this case ends with 2 parentheses. You'll have to make sure you end with as many parentheses as you had If statements at the beginning. Here's how this would look with actual calculations and cell references embedded in each of these parts. I've added a third part to our commission scenario. Let's say that if someone sells more than 5000 dollars they will receive the high commission no matter what. But senior employees, people who've been with the company for more than 12 months, should receive the 8% in the event that they haven't sold more than 5000 dollars. People who have not been around for 12 months, should only get the low commission of 5%. In this case we have 2 different tests to run that which have a different result when they are true, but the same result when they are false. In our commission cell, we'll start with an equal sign and begin the If statement as normal. Our first test is to see whether cell C3 once again is greater than 5000 dollars. The true part of this would be receiving the high commission. So C3 times at 4 applies here again. The next and separate test we want to run will require a nested If. So in the false part area of the first If we begin a second If statement, where we're going to test to see if they're a senior employee. If they haven't sold 10,000 dollars they should receive the 8% bonus. So if cell C5 is greater than 12, separating this with a comma from the next part which is the true part, they will receive the senior bonus which would be cell C3 times cell F8. In the event that neither of these things prove to be true, then they receive the low bonus of 5%. So our false part for the entire statement would be C3 times F6. We'll end with 2 parentheses, one to end the first If and another to end the second If. Hitting enter you see that the high bonus is applying now since sales are over 5000. Once the first If statement proves to be true, the rest of it is not taken into account. When sales are below 5000, the number of months with the company is going to determine whether they get the low bonus or the senior bonus in this case. Right now the low bonus is applying. But if they're with the company, for more than 12 months, the senior bonus then applies to them. This is an example of a nested If statement. You can nest up to 7 If statements inside of each other, that means that 7 different tests can be run on a single cell to determine the outcome of a formula. statements inside of each other, that means that 7 different tests can be run on a single cell to determine the outcome of a formula.
Tutorial Information
| Course: | Microsoft Excel 2000 |
| Author: | Lorie Flenner/NMG |
| SKU: | 33101 |
| ISBN: | 1889347868 |
| Release Date: | 1999-11-22 |
| Duration: | 8 hrs / 103 lessons |
| Captions: | For Online University members only |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 98,729 Video Tutorials (23,265 free)
- Video Available as Flash or QuickTime
- Over 1026 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 