intro to vlookup(): a brief explanationmcurran/text-tutorials/excel-2010-vlookup.pdfvlookup is a...

6
Maureen Curran Technology & Learning Student Choice Assignment 3/13/2011 Microsoft Excel 2010: VLOOKUP() Intro to VLOOKUP(): A Brief Explanation Microsoft Excel 2010 can be used to store a vast amount of data. Sorting through this data cell by cell can become quite time consuming with large spreadsheets. Luckily, Excel provides several functions to quickly manipulate and locate data. We just need to tell the program what we want to accomplish via a function. One of the functions available to help us retrieve relational data, data from one table that corresponds to user input or data from another table, is VLOOKUP. VLOOKUP is a function that allows us to search for a referenced value in a corresponding table of data and return a specific piece of information from the specified range based on the match. By passing data to Excel through the VLOOKUP function, we tell Excel WHAT to look for, WHERE to look for it, and WHICH piece of corresponding data to return to us. This can come in quite handy when searching for unique transactions in a sales data spreadsheet, looking up product costs based on product numbers, or for quickly assigning letter grades to the points earned by a student. The VLOOKUP Function has four arguments, or pieces of information we must provide the function: *Arguments in bold are required for the function to work. Lookup_value is the specific data (either a numeric value, string value or cell reference) we want to find in the first column of the range we will specify in the table_array argument. This is how we tell Excel WHAT we want to look for. Table_array is the multicolumn range, or named range, or data table to be searched. With this argument, we tell Excel WHERE to look for the information we provided in the lookup_value argument. Excel will search for the lookup_value in the leftmost column of the range we specify, so do not select columns further left than those you want to search in. Col_index_num refers to the number of the column in the table_array argument from which we want data returned. The first column would be “1”, the second “2” and so on. This argument identifies WHICH information we want Excel to return to us.

Upload: others

Post on 11-Mar-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Intro to VLOOKUP(): A Brief Explanationmcurran/Text-Tutorials/Excel-2010-vlookup.pdfVLOOKUP is a function that allows us to search for a referenced value in a corresponding table of

Maureen Curran

Technology & Learning

Student Choice Assignment

3/13/2011

Microsoft Excel 2010: VLOOKUP()

Intro to VLOOKUP(): A Brief Explanation

Microsoft Excel 2010 can be used to store a vast amount of data. Sorting through this data cell by cell

can become quite time consuming with large spreadsheets. Luckily, Excel provides several functions to

quickly manipulate and locate data. We just need to tell the program what we want to accomplish via a

function. One of the functions available to help us retrieve relational data, data from one table that

corresponds to user input or data from another table, is VLOOKUP.

VLOOKUP is a function that allows us to search for a referenced value in a corresponding table of data

and return a specific piece of information from the specified range based on the match. By passing data

to Excel through the VLOOKUP function, we tell Excel WHAT to look for, WHERE to look for it, and

WHICH piece of corresponding data to return to us. This can come in quite handy when searching for

unique transactions in a sales data spreadsheet, looking up product costs based on product numbers, or

for quickly assigning letter grades to the points earned by a student.

The VLOOKUP Function has four arguments, or pieces of information we must provide the function:

*Arguments in bold are required for the function to work.

Lookup_value is the specific data (either a numeric value, string value or cell reference) we want to find

in the first column of the range we will specify in the table_array argument. This is how we tell Excel

WHAT we want to look for.

Table_array is the multicolumn range, or named range, or data table to be searched. With this

argument, we tell Excel WHERE to look for the information we provided in the lookup_value argument.

Excel will search for the lookup_value in the leftmost column of the range we specify, so do not select

columns further left than those you want to search in.

Col_index_num refers to the number of the column in the table_array argument from which we want

data returned. The first column would be “1”, the second “2” and so on. This argument identifies

WHICH information we want Excel to return to us.

Page 2: Intro to VLOOKUP(): A Brief Explanationmcurran/Text-Tutorials/Excel-2010-vlookup.pdfVLOOKUP is a function that allows us to search for a referenced value in a corresponding table of

Range_lookup is a Boolean (TRUE or FALSE) argument indicating whether we are

looking for an approximate (TRUE) or exact (FALSE) match. This is not a required

argument because, by default, if omitted from the function, this value is set to

TRUE. Which means if Excel cannot locate an exact match, the function will

return the largest value that is less than the lookup_value. For instance, if we

were looking for “92” in the Grading Scale Table shown on the right, Excel would

return the value in the column we specified which corresponded to “90”, which

is the largest value less than the one we requested.

*For this to work correctly, the search table must be sorted in ascending order

based on the leftmost column in the named range.

Using VLOOKUP(): A Grade Assignment Tutorial

Download the tutorial file from this link (http://www.personal.kent.edu/~mcurran/Grades.xlsx) and

press “Save” on the dialog box that opens. Then press the “Open” button on the dialog box that opens

when the file finishes downloading.

You should see a spreadsheet containing the following information:

Page 3: Intro to VLOOKUP(): A Brief Explanationmcurran/Text-Tutorials/Excel-2010-vlookup.pdfVLOOKUP is a function that allows us to search for a referenced value in a corresponding table of

We need to assign a letter grade (A, A-, B+, B, B-, C+, C, C-, etc.) to each student based on the total

points they’ve earned for the course. We could go through each line individually and lookup Points

Earned in the Grading Scale and manually enter the result in the corresponding Grade cell. But for the

purposes of this tutorial (and making our lives easier) we will write a function to do the first one for us

and then copy that same function to calculate the rest of the records for us. Let’s begin:

1. Click the Formulas tab on the

ribbon to select it. Then place

your cursor into Cell D3 (that’s

the cell located in the D column,

3rd row down) by clicking on the

cell. The column letter and row

number should be highlighted

for the active cell. You should

see the different groups of

functions displayed as books in

the ribbon and your active cell

is now outlined with a small

black box in the lower right

hand corner

2. Click Lookup & Reference (the blue book with the magnifying glass shown on the Formulas

ribbon) and choose VLOOKUP from the drop down list. This will bring up the Function

Arguments input box:

3. Place your cursor in the Lookup_value box and click cell C3 in the spreadsheet.

Page 4: Intro to VLOOKUP(): A Brief Explanationmcurran/Text-Tutorials/Excel-2010-vlookup.pdfVLOOKUP is a function that allows us to search for a referenced value in a corresponding table of

4. Press the <TAB> key to move your cursor down to the Table-array textbox. In the spreadsheet,

select the entire Grading Scale table by placing your cursor on cell F2 (Points Earned) and while

holding down the left mouse key, drag your cursor to cell G2 and then all the way down to cell

G13 and release. The value in the Table_array textbox should now be “F2:G13.

5. Since we want to copy this formula to multiple cells when we are done, and we want to use the

same table_array to lookup each of our other values, we need to make this an absolute

reference. That means that while Excel will automatically update our formula to reference the

correct cells when we copy it, we never want to change this particular value. To make it an

absolute reference, we need to add a “$” before each column and row number. Place your

cursor back in the Table_array

textbox & modify the range as shown:

6. <TAB> to the Col_index_num textbox and enter 2. This specifies that we want to return the

value in the second column (Letter Grade) of the range we selected (Grading Scale) for the

Points Earned value that is the largest value less than the one we specified in our lookup_value

cell reference (C3).

Page 5: Intro to VLOOKUP(): A Brief Explanationmcurran/Text-Tutorials/Excel-2010-vlookup.pdfVLOOKUP is a function that allows us to search for a referenced value in a corresponding table of

7. Your Function Arguments box should now look like this:

8. Click “OK” to complete the calculation. Cell D3 should now have a value of “A-“.

9. To complete the task, we need to copy the

formula to the rest of our spreadsheet.

Select cell D3 by clicking on it. Then place

your cursor on the black box that appears in

the lower right hand corner of the active

cell when it is highlighted. Your cursor

should change to a small black crosshair.

When the crosshair appears, press down on

your left mouse key, hold it and drag all the

way to down to cell D22, then release.

Excel has copied the formula to the

remaining cells, automatically updating the

lookup_value for each record, but leaving

the table_array value the same because we

changed it from a relative reference to an

absolute reference. You will now see the

correct Grades populated for the remaining

students. You may save your work by

clicking the small blue floppy disk in the

upper left hand corner of the Excel window.

Page 6: Intro to VLOOKUP(): A Brief Explanationmcurran/Text-Tutorials/Excel-2010-vlookup.pdfVLOOKUP is a function that allows us to search for a referenced value in a corresponding table of

References

Frye, Curtis D. Microsoft Excel 2010. Redmond, WA: Microsoft, 2010. Print