Excel Module 4 VILT
Excel Module 4 VILT
Trainers Direct
www.trainers-direct.com.au
Excel MODULE 4
(Manual – Version 5)
Page 2 of 12
MODULE 4 EXCEL COURSE NOTES
TABLE OF CONTENTS
THE SUMIF FUNCTION ....................................................................................................... 5
THE COUNTIF FUNCTION .................................................................................................. 5
THE IF FUNCTION ............................................................................................................. 6
INTRODUCTION TO THE VLOOKUP FUNCTION............................................................. 7
STARBUCKS VLOOKUP EXAMPLE ...................................................................................... 8
Vlookup Function Components .................................................................................... 8
Creating the Vlookup Formula...................................................................................... 8
EXCEL KEYBOARD SHORTCUTS.................................................................................. 12
Page 3 of 12
MODULE 4 EXCEL COURSE NOTES
Page 4 of 12
MODULE 4 EXCEL COURSE NOTES
These examples demonstrate how SUMIF adds the values in a that meet criteria that you
specified.
Suppose that in a column that contains numbers, you want to sum only the values that are
larger than 5. You can use the following formula:
=SUMIF(B2:B25,">5")
TIP – use the Insert function dialog box to make formula entry easier.
Here are some further examples using the Sum Range option in addition:
COUNTIF is a function to count cells that meet a single criteria. COUNTIF can be used to
count cells with dates, numbers, and text that match specific criteria. The format is very
similar to Sumif explained above.
Page 5 of 12
MODULE 4 EXCEL COURSE NOTES
THE IF FUNCTION
You can build a conditional formula using an IF function. A conditional formula is one that
makes calculations based on stated conditions. For example you can build a formula to
calculate bonuses based on a persons performance rating. If a person were rated a 5 (the
stated condition) on a scale of 1 to 5, that person would receive 10% of their salary as a
bonus; otherwise, there is no bonus.
The IF Function is made up of three different sections; note that each part is separated by
a comma, the syntax of which is:
The condition is the criteria, which you set; in this example B2 equals 5.
The true statement will only appear as the answer if the condition has been met, the true
statement is C2 (salary) needs to be multiplied by 10%; this will give us 10% of the salary.
The false statement will only appear as the answer if the condition is not met, in this
example if B2 does not equal 5.
NOTE
You may wish to use the Insert Function button on the Ribbon to insert the IF function into
your worksheet instead of typing the function. Insert Function can be found on the
Formulas tab of the ribbon under the Function Library.
Page 6 of 12
MODULE 4 EXCEL COURSE NOTES
The job of the vlookup is to look for a value (either numbers or text) in a column. Once it
finds a match, the vlookup will return a value from any cell in the same row as the match.
Let's look at the Starbucks menu as an example. When looking at the menu you decide
that you want to order a Caffe Mocha. You also know that you want a size Grande. Now
you need to determine the price to make sure I have enough money to pay for this
expensive cup of coffee.
We naturally do this process in a series of steps in our head (see image above):
1. First we look down the list of items on the left side of the menu until we find
Caffe Mocha.
2. Once we find the item, we then look across the columns to the right to find the
price.
3. The prices for the size Grande items are listed in the 3rd column of the menu,
so we scan over to the 3rd column to find our price. There it is, $3.95.
Page 7 of 12
MODULE 4 EXCEL COURSE NOTES
We want to answer the question: “What is the price of a Caffe Mocha, size Grande?”
We will use the vlookup function to answer this question in cell B14.
I explain this simple definition below as we walk through an example of creating a vlookup formula.
Page 8 of 12
MODULE 4 EXCEL COURSE NOTES
In the first argument we tell the vlookup what we are looking for. In this example we are
looking for “Caffe Mocha”. I have entered the text “Caffe Mocha” in cell A14, so we can
make a reference to cell A14 in the formula.
We could also add the text “Caffe Mocha” (surrounded in quotes) directly into the formula.
=VLOOKUP(“Caffe Mocha”
But using cell references (A14) makes the formula easier to copy down and reuse for
lookups on other items.
2. table_array – This is the where argument.
We need to tell the vlookup where to look for “Caffe Mocha”. This argument is specified as
a range of cells, and the vlookup will only look in the left column of this range. We also
need to include the columns that we want to return a value from. In this case we need to
include the price columns because we want to return the price for our lookup_value.
So I reference the range $A$2:$D$10 in the second argument of the function. This means
that the vlookup will look through all the rows in column A, from A2 to A10, in search of the
value “Caffe Mocha”. Once a match is found it will then look to the right a specific number
of columns to return a result.
NOTE: we can also define a table for the range to simplify selection (using Format as
Table on the Home tab).
Page 9 of 12
MODULE 4 EXCEL COURSE NOTES
The column number tells the vlookup which column in the table_array we want to return
as the result. It counts the columns from left-to-right based on the starting column of the
table_array.
Since we want to know the price for the size Grande, I put the number “3” as the third
argument of the function. This will return a result from the third column (column C) of the
table_array.
4. [range_lookup] – This is the closest match argument.
Here we specify whether the vlookup should find an exact match or closest match to the
lookup_value. By default, the vlookup will find the closest match to our lookup_value and
return a result. This method is best used for looking up numbers.
However, for our example we want to find the exact match to the word “Caffe Mocha”, so I
will put “False” for the range_lookup argument. This means that the vlookup will look for
an exact match to the value “Caffe Mocha” in the first column of the table_array. If it does
not find the word it will return an error (#N/A).
The Result – $3.95 for a Grande Caffe Mocha!
Page 10 of 12
MODULE 4 EXCEL COURSE NOTES
The vlookup formula returns the value 3.95 in cell B14 as expected. This formula can now
be reused in other cells to look up other items in the menu. Or you could change the value
in cell A14 to a different menu item, “Cappuccino” for example, to instantly see the price for
the size Grande Cappuccino.
Page 11 of 12
MODULE 4 EXCEL COURSE NOTES
Page 12 of 12