Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Introduction to MIS
AGENDA
I>Clicker questions
In-class Exercise
You may, however, use a pencil/pen and a blank sheet of paper to do any of the
i>Clicker questions.
You must still, however, submit your own response using your own i>Clicker remote.
I>CLICKER QUESTION 1
Which of the following scenarios was used to illustrate the use of COUNTIFS/SUMIFS
in the previous lecture (that is, lecture 03)?
I>CLICKER QUESTION 2
Suppose that in an Excel worksheet, cell A1 contains the text ABC. In the same
worksheet, cell B1 contains the formula =IF(A1="abc",1,0). When the formula is
executed, the value returned in cell B1 will be:
(A) 1
(B) 0, because of the different case (ABC is in uppercase, while abc is in lowercase)
(C) 0, because the text ABC in cell A1 does not have quotation marks surrounding the
text
(D) abc
I>CLICKER QUESTION 3
Mamasita Restaurant sells five types of dish, each of which is either Main or
Dessert. The following table lists the number of portions of each dish made and sold
yesterday.
When the formula is executed, the value returned in cell E1 will be:
(A) 110
(B) 70
(C) 1
(D) 0
I>CLICKER QUESTION 4
When the formula is executed, the value returned in cell E2 is 40. A possible value that
fits the _________ in the above formula that will produce such result is:
(A) Laing
(B) Adobo
(C) 50
(D) 40
(E) 35
The VLOOKUP function looks up a value in the first column of a range of cells, and
then returns a value from any cell on the same row of the range.
ProductCode
DC50
DC70
DC80
MCA
MCC
WCC
exact matches, or
The nearest value that is less than or equal to the search value. For
example, you can use VLOOKUP to assign a grade of B+ for students
who receive a grade from 76 to 79.
Description
DarkChocolate 50Per Cent
DarkChocolate 70Per Cent
DarkChocolate 80Per Cent
Milk Chocolate with Almonds
Milk Chocolate Only
White Chocolate
UnitPrice
$ 14.00
$ 14.50
$ 15.50
$ 13.50
$ 13.00
$ 12.50
GradeLookupTable
LowerBound Letter
0
F
50
D
55
C60
C
64
C+
68
B72
B
76
B+
80
A85
A
90
A+
If the VLOOKUP is used to find an exact match, the rows can be in any order.
VLOOKUP starts with the first value in the first column, and works its way down until it
finds a match.
Therefore, to avoid mistakes, make sure that each value in the first column is
unique. That is, that there are no duplicates in the first column.
Approximate Matches
If you want to look up a value in a range (e.g. 76 to 79), you MUST arrange the lookup
table so that the data are sorted from the lowest to the highest.
You MUST only include the lowest value in the range (in this case, 76). It is called
the breakpoint.
Grade
Range
Grade
90 100
A+
85 89
50
80 84
55
76 79
B+
60
72 75
64
C+
68 71
68
64 67
C+
72
60 63
76
B+
55 59
80
50 54
85
0 49
90
A+
Argument
Description
lookup_value
table_array
col_index_num
[range_lookup]*
*Optionalonly
required if you want to
find an exact match.
Figure 3
We want to award the letter grade based on the numerical score in column D, so the
lookup_value will Score. In this case, it is D3.
The table_array will be the lookup table, which is G4:H14. It is a good idea to make
this table array an absolute reference $G$4:$H$14 because we will need to copy and
paste the formula. However, VLOOKUP will work even if it is left as G4:H14.
We want Excel to return the letter grade from the lookup table. The letter grade is in the
second column of the lookup table, so the col_index_num is 2.
We dont need to enter the [range_lookup] argument as we are not finding an exact
match. If you, however, still want to include a [range_lookup], then type TRUE.
Dont forget to type the closing bracket, and your formula should look like this:
=VLOOKUP(D3,$G$4:$H$14,2)
Drag the formula down to fill the rest of column E until you reach cell E10. Then,
compare your results with Figure 4 below.
Figure 4
Now we turn to an example of the VLOOKUP function when we want to find exact
matches.
Figure 5
The VLOOKUP function can automate the process of entering Product Description,
Unit Price, and Order Amount each time.
This way, every time a customer orders, all we need to do is fill in the Product Code
and Quantity. The Product Description and Unit Price can be filled in through the use of
a VLOOKUP function. The Order Amount can be filled in by a multiplication function.
The VLOOKUP functions that we are going to use in this scenario is different from the
approximate match example. Here, we need to find exact matches.
We will need to ensure that Excel only returns a value for Product Description and Unit
Price only if the Product Code is listed in the Product List.
Thankfully, the only difference between a VLOOKUP function that searches for an
approximate match and the one searching for an exact match is in the [range_lookup].
For lookup_value, you want to look up cell A19 since we want to match the Product
Code in the Phone Order Form with the Product Code in the Product List. Begin by
typing =VLOOKUP(A19,
The lookup table for this scenario is the Product List. Therefore, the table_array is
$A$4:$C$9. Your formula should now look like this: =VLOOKUP(A19,$A$4:$C$9
Since we want Excel to fill in the Description, the col_index_num is 2. Your formula
should now look like this: =VLOOKUP(A19,$A$4:$C$9,2
Press enter, and then copy and paste the formula until you have reached cell B22. The
results will temporarily be #N/A because we have not filled in the Product Code.
You can create a similar VLOOKUP function for the Unit Price (cells D19 through D28).
Your formula should look like this:
=VLOOKUP(A19,$A$4:$C$9,3,FALSE)
The only difference here is changing col_index_num to 3. Copy and paste the
formula until you have reached cell D22.
You can also make a formula for column E (Order Amount), which is Quantity * Unit
Price. In cell E19, this will be = C19*D19
Figure 6
ADDITIONAL REFERENCES
Gaskin, Shelley, et al. Go! With Microsoft Excel 2013 Comprehensive. Upper Saddle
River: Pearson Prentice Hall, 2013. Print.
Poatsy, Mary, et al. Exploring: Microsoft Excel 2013, Comprehensive. Upper Saddle
River: Pearson Prentice Hall, 2013. Print.