VLOOKUP ([Score], A5:B10, 2)

advertisement
K201 Spring 2008
Mrs. Hammerle
Example 1:
Enter a formula in cell AB20 to calculate monthly payments for a negative 300,000 investment
loan to be paid over 60 months paid at the end of every month. The annual interest rate is 5%.
Answer:
Look for key words and phrases like monthly payments, investment loan, over 60 months,
annual interest rate.
The phrase monthly payments should tell you that it is the PMT function.
1. Click on the Insert Function button on the Formulas tab and select the PMT function.
2. Fill in the arguments you know:
Rate = interest rate; remember if the payment period is monthly, the annual interest
rate must be made monthly by dividing it by 12 (5%/12)
Nper = number of periods (60)
Pv = present value of the loan amount (-300000)
The formula in cell AB20 will look like this:
=PMT(5%/12,60,-300000)
K201 Spring 2008
Mrs. Hammerle
Example 2:
Enter a formula in cell B12 to lookup the closest match for the value of cell C14 within the first
column of the array names LoanAmounts and return the corresponding value from column 4.
Answer:
In this example, the key phrase is lookup the closest match which tells you this is a LOOKUP
table. Another word for table is array and in this example the array (or table) is called
LoanAmounts.
The formula for a VLOOKUP requires the lookup value (C14), the range you are looking in
(LoanAmounts) , and the column the corresponding value will come from (4).
The formula in cell B12 will look like this:
=VLOOKUP(C14,LoanAmounts,4)
*Note: When studying VLOOKUP make sure you understand how to specify an exact match AND an
approximate match. (This is where you add the 4th variable, TRUE or FALSE)
Example 3:
Enter a formula in cell A12 to return a value of 10% if the cell B9 is greater than 50,000 or 5% if
cell B9 is not greater than 50,000.
Answer:
The key word in this problem is if. You have to know what the logical test is (in this case is B9
greater than 50,000) and what to do if it’s true (put 10% in cell A12) or if it’s not true (put 5% in
cell A12).
The formula in cell A12 will look like this:
=IF (B19>50000,10%,5%)
K201 Spring 2008
Mrs. Hammerle
Example 4:
Enter a nested condition to determine a student’s extra credit assuming the following:
If the score is 5, then the extra credit is 100; otherwise, if the score is 4, then the extra credit is
90; anything else and the extra credit is zero. Use calculated columns [score] and [extra credit]
in the nested condition.
Answer:
The keyword here is nested condition and it means you use a nested IF function. This means
the condition if false is another IF function.
=IF([score]=5, 100, IF([score]=4, 90, 0))
Example 5:
Enter a condition that displays the word “WARNING” if the grade is an F AND the if the student
is a Senior. Otherwise, display the word “OK”. Use the calculated columns [grade] and [year].
Answer:
When there are two conditions to be met like in this example, you have to use an IF function
with the AND function. Both conditions are listed in the AND function and then the value if true
and value if false are listed.
= IF(AND([grade] = ”F”, [year] = “senior”), “WARNING”, “OK”)
K201 Spring 2008
Mrs. Hammerle
Example 6:
Use the SUMIF function to enter a formula in cell A7 to sum the scores of the students who are
seniors. The table you are looking in is called Grades and the scores are located in the [score]
column. The year is located in the [year] column.
Answer:
With SUMIF you have to specify what you are looking to match (the IF part), what the IF part
should match, and then what you want added. In this case, you are looking in the year column
for it to say Senior, and you are adding the scores for those records.
= SUMIF([year], “Senior”, [score])
Example 7:
In cell L16 use the VLOOKUP function to display the letter grade for each of the student’s
scores. Use the student’s score in the Score column as the lookup value. The range of the table
you are looking in is A5:B10 (the letter grade is in the 2nd column) and is called GradingScale.
You are looking for an approximate match.
Answer:
= VLOOKUP ([Score], A5:B10, 2)
OR
=VLOOKUP ([Score], GradingScale, 2)
Download