AdvancedExcel2 Instructions
AdvancedExcel2 Instructions
Introduction:
During the following Excel assignment, you will learn how to use some of the advanced VLOOKUP powers of
Microsoft Excel, as well as the power of compound formulas. By completing this assignment, you will also learn
how to design a spreadsheet to find data quickly by creating a custom user interface. This assignment will walk
you through several practice spreadsheets demonstrating different ways to use lookup commands in Excel.
After completing the practice spreadsheets, you will move on to create some lookups of your own. You will be
graded on the completion of both the practice spreadsheets and the assignment spreadsheets.
=VLOOKUP(
Once you type the opening parenthesis, Excel will display the following guide below the red highlighted cell:
VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]). These are the parameters you will
need to provide Excel to create a working VLOOKUP formula.
1
The lookup_value is what you want the formula to find. In this case, we want to see the sales for Sam.
Continue entering your formula by adding “Sam” for the lookup_value (you will need to put Sam in quotes so
Excel doesn’t think you are trying to name another function). After typing “Sam” type a comma. Your formula
should now look like this:
=VLOOKUP(“Sam”,
The table_array is Excel’s way of asking you where it will find the data you wish for it to look up. There are a
couple rules you must follow when entering the table_array. First, the range of cells you provide as the
table_array must include all of the data inside the table (do not include the row of headings at the top). In this
case you will include all the names and sales numbers. The second rule is that the cells furthest to the left of
your table_array must include the lookup_value, in this case, the employee names. To enter your table_array,
click and drag to select cells A3 through M12, and then type a comma. Your formula should now look like this:
=VLOOKUP(“Sam”,A3:M12,
The col_index_num is the column number in your table_array which contains the value you want Excel to
return. In this case, we want to see the data in the March column. Counting from the first column in your
table_array (column A), the March column is the fourth from the left (column D). Enter the number 4 for the
col_index_num and then type a comma. Your formula should now look like this:
=VLOOKUP(“Sam”,A3:M12,4,
The final part of the VLOOKUP is the range_lookup. The range_lookup is a True or False setting to tell Excel if
you wish to return an approximate match, or an exact match to the lookup_value you provided. In this case we
want to see Sam’s sales for March exactly. We don’t want Excel to provide the March sales for an employee
with a name similar to Sam! After typing the comma after the 4, you should see a small pop-up menu for the
True or False arguments for the range_lookup. Double-click on FALSE. If you don’t see the pop-up menu, you
can just type the word FALSE. Your formula should now look like this:
=VLOOKUP(“Sam”,A3:M12,4,FALSE
As we have now satisfied all the requirements for the VLOOKUP formula, type a closing parenthesis and press
enter. If you did everything right, you should see the number 34 appear in the red outlined cell where you
entered your formula. Looking at the table, you should be able to confirm that the March sales for Sam is
indeed 34. Excel returned this value by first finding the row with Sam, and then counting over 4 columns
(March sales) to return the number 34. While this might not seem like a big deal, keep in mind that we could
have constructed a similar formula to quickly look up data in a table with thousands of employees, instead of
the small table used in the practice. This can be a real time saver!
=VLOOKUP(
2
This time, instead of entering an employee name in the equation, click on the green highlighted cell (A17) for
the lookup_value argument, and then type a comma. Your formula should now look like this:
=VLOOKUP(A17,
As before, click and drag to select your table_array, and then type a comma (remember that the first column
must contain the employee names, and the cells you select must contain the data you want Excel to look up).
Your formula should now look like this:
=VLOOKUP(A17,A3:M12,
Since in this practice we want to find the sales from June, the col_index_num will be different from the last
practice. Starting with the first column of the selected table_array (column A), the June sales numbers are in
the 7th column from the left (column G). Enter 7 for the col_index_num, and type a comma. Your formula
should now look like this:
=VLOOKUP(A17,A3:M12,7,
As we again wish for Excel to find an exact match for the data we are providing, enter FALSE for the
range_lookup. Your formula should now look like this:
=VLOOKUP(A17,A3:M12,7,FALSE
Type a closing parenthesis and press enter. You should see the number 54 appear in the red highlighted box
where you entered your formula. A quick look at the table should confirm that the June sales for Hal is correct.
To see the difference between this practice and the last, type the name of a different employee in the green
highlighted cell (A17) and press enter. You will see that Excel will automatically look up the June sales for any
employee name in the table that you enter! While this is certainly an improvement from the first practice, the
table contains sales numbers for each month. Wouldn’t it be nice to be able to change the employee names
AND the month to navigate the entire table quickly? This can be done easily with the addition of the Excel
MATCH function inside the VLOOKUP function. That’s right, Excel allows you to put functions inside other
functions!
=VLOOKUP(A17,A3:M12,
Now comes the interesting part. For the col_index_num argument we will start a MATCH function by typing
MATCH and an open parenthesis. Your formula should look like this:
=VLOOKUP(A17,A3:M12,MATCH(
3
Once you type the opening parenthesis, Excel will display a guide asking for the following arguments:
MATCH(lookup_value, lookup_array, [match_type])
The lookup_value works the same as with the regular VLOOKUP function. In this case we want the MATCH to
look up the position of the name of a month, so our lookup_value will be the blue highlighted cell (B16). Click
on cell B16 to set it as the lookup_value for the MATCH function and type a comma. Your formula should now
look like this:
=VLOOKUP(A17,A3:M12,MATCH(B16,
The lookup_array works like the table_array in the VLOOKUP function. It will be the range of cells which
contain the values we want Excel to find. In this case the lookup_array for the MATCH function will be the
months. However, if we select only the names of the months, the returned number will be off by one. For
example, if we select only the names of the months for the lookup_array, the MATCH function would return
the number 1 for January, 2 for February, and so on. Because we are using the MATCH inside our VLOOKUP
formula, and because the table_array in our VLOOKUP includes the employee names for the first column (A),
we actually need the MATCH function to return the number 2 for January, 3 for February, and so on. We can
easily make the MATCH function do this by simply adding an extra cell to the left of the month names. For the
lookup_array in the MATCH function, select cells A2 through M2 (the names of the months plus one cell to the
left of the month names) and type a comma. Now, when the MATCH function looks to locate January, it will
find that it is in the second cell from the left in the lookup_array we provided, and return the number 2, which
will work perfectly for the col_index_num in the VLOOKUP formula containing the MATCH function! Your
formula should now look like this:
=VLOOKUP(A17,A3:M12,MATCH(B16,A2:M2,
The final argument for the MATCH function is the match_type, which is similar to the range_lookup for the
VLOOKUP function. After typing the comma following the lookup_array, you should see a pop-up menu asking
you to pick from three different possibilities: 1 for less than, 0 (zero) for an exact match, or -1 for greater than.
As we want Excel to find an exact match for the month we enter, double-click the 0 choice (or you can just
type a 0). Your formula should now look like this:
=VLOOKUP(A17,A3:M12,MATCH(B16,A2:M2,0
As the match type was the final argument for the MATCH function, type a closing parenthesis and then type a
comma to make your formula look like this:
=VLOOKUP(A17,A3:M12,MATCH(B16,A2:M2,0),
Now we just need to provide the range_lookup argument for our original VLOOKUP formula, which is FALSE
just as was the case in the previous practices. Your formula should now look like this:
=VLOOKUP(A17,A3:M12,MATCH(B16,A2:M2,0),FALSE
Now we just need to type a closing parenthesis to complete the VLOOKUP formula. Type a closing parenthesis
and press enter. The number 23 should appear in the red highlighted cell where you entered your formula. A
quick look at the table should confirm that 23 is the sales number for Alex in June. Test your formula by
changing the employee name in the green highlighted cell and the month in the blue highlighted cell to
confirm it is functioning correctly.
4
So how does this compound formula work? When Excel executes the VLOOKUP formula, it first determines the
correct row by looking at the employee name in the green highlighted cell, and then locating that name in
column A (the left most column in the table_array we entered in the VLOOKUP). When Excel attempts to find
the col_index_num to locate the column with the proper monthly sales, it finds a MATCH formula. When Excel
executes the MATCH formula, it looks at the name of the month entered in the blue highlighted cell and
locates it in the lookup_array (cells A2:M2). If June is entered in the blue highlighted box, the MATCH function
starts counting the cells starting from cell A2 until it finds June. June is the seventh cell to the right starting
with cell A2, so the MATCH function, when executed, returns the number 7 for the col_index_num part of the
VLOOKUP formula! Finally, the FALSE in the VLOOKUP tells Excel that we want an exact match on the name of
the employee name in the green highlighted box.
Now let’s make our 2-way VLOOKUP even easier to use by creating lists to select the employee name and
month instead of having to type them each time.
=VLOOKUP(A17,A3:M12,MATCH(B16,A2:M2,0),FALSE)
After pressing Enter, you’ll notice the value of the cell is “#N/A”. This is fine; actual values will become visible
after you create the lists below.
To create lists to allow us to select an employee name (instead of typing the name), we are going to use a
validation rule. Validation rules are used to make sure user entries are valid. To create the validation rule for
the employee name, click to select the green highlighted cell. Now go to the Data tab in toolbar at the top of
your screen. Once on the Data tab, click the Data Validation button. On the Settings tab of the Data Validation
window, select List in the Allow drop down menu:
Click in the Source box and select the cells with the employee names in the table at the top of the spreadsheet.
Your Data validation window should look like this:
5
Click the OK button on the Data Validation window to create the list. Now click on the green highlighted cell to
see a drop-down arrow. When you click the dropdown arrow, Excel will display a list of employee names to
choose from. Now you can simply select employee names instead of typing them each time! Create another
data validation list for the blue highlighted cell in the same way, but make sure you select the names of the
months (cells B2 through M2) for the source of the list. After completing both lists, use the dropdown arrows
in the green and blue highlighted cells to select an employee name and month. You should now see the results
of your formula in the red outlined cell.
Note: occasionally the red outlined cell might be covered by a black box from the list entries, blocking it
from view. If this happens, simply click on a different spreadsheet tab, and then go back to the tab you are
working on to clear away the black box.
Before moving on, click the blue cell under “Month” to make it the active cell. Now, for our final practice, we
will add a new function to our VLOOKUP called CHOOSE to allow us to create a 3-way lookup!
To start, create data validation lists for the green and blue highlighted boxes like you did in the previous
practice. Now create a data validation list for the yellow highlighted cell, but instead of selecting cells for the
source, just type 1,2,3 (this will allow any of the three years to be selected). Your data validation window for
the yellow highlighted cell should look like this:
6
Once you have the data validation lists working in the highlighted cells, click to select the red outlined cell and
begin your VLOOKUP formula like this:
=VLOOKUP(P5,
So far you have told Excel to lookup the employee name in the green highlighted cell (P5). The big difference
between this formula and the 2-way VLOOKUP is going to be the table_array. In this practice we don’t have a
single table_array, we have three separate table arrays, one for each year! This means we need to tell Excel
which table_array to use. To accomplish this, we will use a CHOOSE function inside the VLOOKUP function. The
CHOOSE function is simple: We provide Excel with multiple choices (values) and pick which one to use. In this
case, we will provide Excel with three table_array choices (one for each year), and we will pick one of those
choices by selecting 1, 2, or 3 from the yellow highlighted cell. To begin the CHOOSE function, type the
following for the table_array in your VLOOKUP formula:
=VLOOKUP(P5,CHOOSE(
When you type the opening parenthesis for the CHOOSE function Excel will display the following guide:
CHOOSE(index_num, value1, [value2], …)
For this practice, the Index_num will be the yellow highlighted cell (R4), which can contain a 1, 2, or 3. The
values in the CHOOSE function will be the range of cells making up the three different table_arrays. To
complete your CHOOSE function, enter R4, followed by all three cell ranges (Year 1, then Year 2, and then Year
3). Remember, do not include any heading rows in your ranges, and be sure to separate each argument by
commas. Your formula should now look like this:
=VLOOKUP(P5,CHOOSE(R4,A3:M12,A17:M26,A31:M40),
When Excel attempts to find the table_array for the VLOOKUP, it finds the CHOOSE function. When it executes
the CHOOSE function, the contents of R4 (1, 2, or 3) will determine whether the table_array should be the first,
second, or third range of cells you provided.
The next part of the VLOOKUP will be the MATCH function we used previously to determine which month the
user selected. To add the MATCH, make your formula look like this:
7
=VLOOKUP(P5,CHOOSE(R4,A3:M12,A17:M26,A31:M40),MATCH(Q4,A2:M2,0),
Just as before, the MATCH function will provide the VLOOKUP formula with the column number corresponding
to the month in the blue highlighted cell.
The last step in the formula is to add the FALSE argument to tell Excel we want an exact match on the
employee name in the green highlighted box. Your completed formula should look like this:
=VLOOKUP(P5,CHOOSE(R4,A3:M12,A17:M26,A31:M40),MATCH(Q4,A2:M2,0),FALSE)
Once you have completed your formula, press enter, and confirm it is working by selecting values from your
lists in the green, blue, and yellow highlighted cells. Notice how much faster it is to find the values with the
VLOOKUP formula than it is to try and find the values by looking them up in the tables manually! Before
moving on, click the blue cell under “Month” to make it the active cell.
2-Way VLOOKUP Assignment tab: In the red outlined cell, create a 2-way VLOOKUP formula that will return
the correct grade for a student’s name typed in the green highlighted cell and course typed in the blue
highlighted cell. After completing your formula, confirm it is working by typing in a name and course in the
green and blue highlighted cells. Before moving on, click the blue cell under “Course” to make it the active cell.
VLOOKUP with Lists Assignment tab: Create data validation lists in the green and blue highlighted cells that
allow you to select a name and course. Then create a 2-way VLOOKUP formula in the red outlined cell to
return the correct grade for a student based on their name and course. After completing your formula, confirm
it is working by selecting values from your lists in the green and blue highlighted cells. Before moving on, click
the blue cell under “Course” to make it the active cell.
3-Way VLOOKUP Assignment tab: Create data validation lists in the green, blue, and yellow highlighted cells
that allow you to select a name, course, and semester. Then create a 3-way VLOOKUP formula in the red
outlined cell to return the correct grade for a student based on their name, course, and semester (there are
three separate tables: Semester 1, Semester 2, and Semester 3). After completing your formula, confirm it is
working by selecting values from your lists in the green, blue, and yellow highlighted cells. Before moving on,
click the blue cell under “Course” to make it the active cell.
Now that you have completed this assignment, please verify that your file is saved with the naming convention
LastName-FirstInitial-AdvancedExcel2.xlsx (for example, if your name was Carol Danvers, your file would be
named Danvers-C-AdvancedExcel2.xlsx). Make sure your file is saved to a safe location like your desktop or a
folder you created for this assignment, and then submit it in Canvas.
Note: After submitting your assignment, Canvas displays an image of your file. The image Canvas shows will
NOT look exactly like your Excel file (table formatting and highlighted cells may look different, and that’s fine).
If you submit the wrong file, click New Attempt and submit the correct file (only your last submission will be
graded).
8