Comparing and linking tables of data using VLOOKUP

Similar documents
Excel: Linking sheets and summary sheets (Mac OS)

Excel VLOOKUP. An EMIS Coordinator s Friend

Microsoft Excel 2007

Excel Tips for Compensation Practitioners Weeks 9-12 Working with Lookup Formulae

Recording assessment in SITS using Excel and Turnitin

IF & VLOOKUP Function

Excel 2. Module 2 Formulas & Functions

ADVANCED EXCEL: LOOKUP FUNCTIONS

How to use the Vlookup function in Excel

NUMERICAL COMPUTING For Finance Using Excel. Interpolation

VLOOKUP Function Purpose (Mac Guide)

Using Excel for a Gradebook: Advanced Gradebook Formulas

Excel Conditional Formatting (Mac)

Safari ODBC on Microsoft 2010

Microsoft Excel Lookup Functions - Reference Guide

Advanced Formulas and Functions in Microsoft Excel

Excel Intermediate. Click in the name column of our Range of Data. (Do not highlight the column) Click on the Data Tab in the Ribbon

MS EXCEL: TABLES, FORMATS, FUNCTIONS AND MACROS

CMPF124 Microsoft Excel Tutorial

Pivot Table Project. Objectives. By the end of this lesson, you will be able to:

Using Microsoft Excel

Excel & Business Math Video/Class Project #33 VLOOKUP Function for Incentive Pay: Commissions and Piecework

Programs for American Fidelity WorxTime

Excel Level 3 - Advanced

Printing Monthly Eligible List for Providers

Getting Started with Excel

EMIS - Excel Reference Guide

Formulas and Functions

Become strong in Excel (2.0) - 5 Tips To Rock A Spreadsheet!

UPDATING E-AUTOMATE VENDOR ITEM NUMBERS WITH NEW SN REFERENCE NUMBERS

Excel as a Tool to Troubleshoot SIS Data for EMIS Reporting

Intermediate Excel Training Course Content

Formulas, LookUp Tables and PivotTables Prepared for Aero Controlex

MODULE VI: MORE FUNCTIONS

1.a) Go to it should be accessible in all browsers

1. NORM.INV function Returns the inverse of the normal cumulative distribution for the specified mean and standard deviation.

FSFOA EXCEL INSTRUCTIONS. Tips and Shortcuts

Data Service Center May, Compiled by: Katey Semmel Donna Frieze

What is a VLOOKUP? Source

Vlookup for dummies two sheets vlookup

Technology Applications for the Financial Aid Office. Wes Brothers Director of Financial Aid Ohio Christian University

More Excel as a Tool to Troubleshoot SIS Data for EMIS Reporting

MICROSOFT OFFICE APPLICATIONS

Instructions on Adding Zeros to the Comtrade Data

exam. Number: Passing Score: 800 Time Limit: 120 min MICROSOFT Excel 2013 Expert Part One.

Excel Foundation Quick Reference (Windows PC)

NHS e-referral Service

What is a spreadsheet?

My Top 5 Formulas OutofhoursAdmin

Excel: Tips and Tricks Speaker: Marlene Groh, CCE, ICCE Date: June 13, 2018 Time: 2:00 to 3:00 & 3:30 to 4:30 Session Number: & 27097

Advanced formula construction

Advanced Excel. IMFOA Conference. April 11, :15 pm 4:15 pm. Presented By: Chad Jarvi, CPA President, Civic Systems

Open you WordPad/NotePad File in Excel. How to Move Text to Columns (You can see all data in Column A)

Advanced Excel for EMIS Coordinators

Excel Expert Microsoft Excel 2010

EXCEL AS BUSINESS ANALYSIS TOOL. 10-May-2015

Vlookup and Sumif Formulas to assist summarizing queried data

EVALUATION COPY. Unauthorized Reproduction or Distribution Prohibited

Microsoft Excel Prepare Test Session File

Ahmad Al-Rjoub Excel Tutorial 7. Using Advanced Functions, Conditional Formatting, and Filtering

Top 15 Excel Tutorials

VLOOKUP() takes three mandatory parameters and one default/optional parameter:

Functions in Excel. Structure of a function: Basic Mathematical Functions. Arithmetic operators: Comparison Operators:

Tutorial 1: Using Excel to find unique values in a list

Fiscal Learning Council Conference Managing Excel Tips Candi Ray, Mayor s Finance

Microsoft Excel 2010 Handout

Excel 2016: Formulas & Functions

Intermediate Excel 2016

2. In Video #6, we used Power Query to append multiple Text Files into a single Proper Data Set:

Skill Set 5. Outlines and Complex Functions

EVALUATION COPY. Unauthorized Reproduction or Distribution Prohibited EXCEL ADVANCED

SPREADSHEET (Excel 2007)

ICT IGCSE Practical Revision Presentation Spreadsheets. Columns. Rows. This is a range of cells. More than one cell has been selected.

MS Excel How To Use VLOOKUP In Microsoft Excel

1. Right-click the worksheet tab you want to rename. The worksheet menu appears. 2. Select Rename.

Commonly Used Excel Formulas

Microsoft Excel Basics Ben Johnson

Excel Format cells Number Percentage (.20 not 20) Special (Zip, Phone) Font

Excel Tables and Pivot Tables

Pivot Tables, Lookup Tables and Scenarios

Unit 12. Electronic Spreadsheets - Microsoft Excel. Desired Outcomes

Spreadsheet Microsoft Excel 2010

Lecture-14 Lookup Functions

Activity: page 1/10 Introduction to Excel. Getting Started

MOVING AND COPYING DATA...

Beginning Excel. Revised 4/19/16

1. Two types of sheets used in a workbook- chart sheets and worksheets

Using Excel 2011 at Kennesaw State University

Excel Tips for Compensation Practitioners Weeks Data Validation and Protection

Microsoft Excel 2007 Beginning The information below is devoted to Microsoft Excel and the basics of the program.

Excel 2010 Formulas Not Working In 2003 >>>CLICK HERE<<<

Excel & Business Math Video/Class Project #39 Create Invoices in Excel with Data Validation Drop-down, VLOOKUP & IF Functions

Microsoft Excel. for Finance Majors. Microsoft Excel for Finance Majors

How Commercial Off-the-Shelf (COTS) Business Intelligence (BI) Tools Can Improve Financial Management Analysis

WORKING WITH LOOKUP TABLES

3 Excel Tips for Marketing Efficiency

Microsoft Excel 2010 Training. Excel 2010 Basics

This lesson is part 5 of 5 in a series. You can go to Invoice, Part 1: Free Shipping if you'd like to start from the beginning.

USING FORMULAS AND FUNCTIONS...

M i c r o s o f t E x c e l A d v a n c e d P a r t 3-4. Microsoft Excel Advanced 3-4

Transcription:

[Type here] Comparing and linking tables of data using VLOOKUP This document looks at how you can minimise duplication in your Excel data by sharing data between worksheets. Instead of copying and pasting data into a new worksheet for analysis, you can use cell referencing and functions to pull data from other Excel sources Videos of using VLOOKUP are available to view on our website Last updated By Faye Brockwell 20 th November 2017 This document is held online on our website: https://staff.brighton.ac.uk/is/training

University of Brighton Information Services Contents VLOOKUP videos on our website... 2 VLOOKUP Functions... 3 Note on holding data in Excel... 3 Steps for using VLOOKUP... 4 Prepare your data table... 4 Sort the master data table... 4 Name the master data table... 4 Build the VLOOKUP function... 5 To build the VLOOKUP function... 6 Copy the VLOOKUP to the rest of the worksheet... 7 Excercises... 8 Solutions...12 VLOOKUP videos on our website We have put together a Lynda.com playlist with videos showing how to build VLOOKUPS. For links to the playlist, visit https://staff.brighton.ac.uk/is/training/pages/excel/linking.aspx You will also find examples of using VLOOKUP to populate CAMS assessment sheets on the following pages of our website: https://staff.brighton.ac.uk/is/training/pages/excel/linking.aspx https://staff.brighton.ac.uk/is/training/pages/excel/cams.aspx Page 2 Last Updated Faye Brockwell

VLOOKUP Functions Comparing and linking tables of data using VLOOKUP VLOOKUP functions are used to pull data into a cell from a master data table. Some examples of where this can be used: On a sheet recording interactions with a student, automatically populate a student s name and course details when the student number is typed in. On a sheet listing student marks, automatically populate the grade and check digit when the mark is typed in. On a list of employees, automatically populate the tax rate based on salary. This is especially useful where several spreadsheets use the same data. You can have one sheet holding that data and then allow the other sheets to reference that information using the VLOOKUP function. This allows you to maintain data centrally. Any updates will automatically update the other sheets. For example, the table above on the left is used to record interactions with a student. The student number is recorded each time they have a meeting with a careers adviser. The table on the right holds student data. Column A holds the student numbers. If we want to know the school of a student listed in the table on the left, we use the student number to find the correct row in the master data table on the right and from there we can find the information we are looking for. For example, in row 5 in the table on the left we need to find the details for student number 11376481. We find student number 11376481 in the table on the right and can see that his school is Arts & Media. This is exactly what an Excel VLOOKUP does (only faster!) Note on holding data in Excel VLOOKUP functions enable you use Excel as a simple relational database. If you think you want to do this, especially if you plan to hold student or staff personal data, please talk to the Service Desk who can advise you whether the data you are working with can be managed within one of our centrally managed business systems (e.g. SITS/CAMS). https://staff.brighton.ac.uk/is/training/pages/excel/linking.aspx Page 3

University of Brighton Information Services Steps for using VLOOKUP 1 Prepare your data table o o Sort the data table Name the data table 2 Build the VLOOKUP function in the first row 3 Copy the VLOOKUP to the rest of the worksheet Prepare your data table Before you can use a VLOOKUP function, you must first prepare your master data table. Sort the master data table The master data table must have unique entries in the first column and the table must be sorted on the first column in ascending order. To sort the table: click in the first column of the data table On the Home tab, click on the Sort & Filter icon Choose Sort A to Z Name the master data table Assigning a name to the master data table makes it easier to build the VLOOKUP function as you can use the name instead of specifying a range of cells. To name the table: Select all of the cells in the data table (you can use your mouse to do this or click anywhere in the table and press CTRL+A on a PC keyboard, +A on a Mac keyboard). Type a name for the data table in the Names box just above the worksheet and press ENTER. Spaces are not allowed in Names; use the underscore if you want to use more than one word. Tip: You can use the Name Manager on the Formulas tab to edit a named area on a worksheet (e.g. edit the cell range, delete a name or rename a named area). Page 4 Last Updated Faye Brockwell

Build the VLOOKUP function Comparing and linking tables of data using VLOOKUP The VLOOKUP function requires 4 pieces of information (arguments): =VLOOKUP(lookup value, table array, col_index_num, range_lookup) Lookup_value Table_array What from this sheet do you want to find on the other sheet? i.e. the cell reference of the cell containing the item of data in this row on your worksheet that can be used to find the correct entry in the master data table Where to look for it i.e. the name or the absolute cell references of the data range of the master data table where you will find what you re looking for e.g. C2 e.g. student_table or $A$1:$E$150 Col_index_num Range_lookup Which column in the other table contains the data you are looking for i.e. the column in your master data table (counting from the left) containing the answer to your question What to do if there is no exact match i.e. tell you if no exact match has been found or work with the nearest possible match? e.g. 5 e.g. FALSE or TRUE So, the VLOOKUP in cell D5 in the table above left might read: =VLOOKUP(C5,student_table,5,FALSE) where student_table is the name of the table on the right. See the next page for step-by-step instructions for building the VLOOKUP function. https://staff.brighton.ac.uk/is/training/pages/excel/linking.aspx Page 5

University of Brighton Information Services To build the VLOOKUP function 1 Click in the cell where you want the answer to the VLOOKUP to appear e.g. in our example on the right, click in cell D5 as the VLOOKUP will be used to find the school for student 11376481. 2 Type =VLOOKUP( 3 Click on the Build function icon to open the Function Builder dialogue box. 4 Click in the Lookup_value field and then, on your worksheet, click on the cell in that row containing the item of data on your worksheet that can be used to find the correct entry on the master data table e.g. if we were building a VLOOKUP function in cell D5 in the example above, we would click on the cell C5 to specify that the student number 11376481 should be used to find the entry we re looking for in our data table. This is because student number is the piece of data that both tables have in common. 5 Click in the table_array field and type the name of the data table the was created earlier (see Name the master data table) If you do not name the table, use the cell references of the range of cells containing your data table. Use dollar signs to make these references absolute (eg $A$1:$E$150). On a Windows computer, pressing the F4 key immediately after selecting the cell range will put the dollar signs in for you). 6 Click in the Col_index_num field and type the number of the column, when counting from the left of the table, containing the answer to your VLOOKUP. E.g. in our example above, if we want to find the school for a particular student, the school column is the fifth column when counting left to right. So we type 5 in the Col_index_num of our VLOOKUP. Note: never use the column letters in a VLOOKUP. 7 Click in the Range_lookup field and type: FALSE TRUE Look for exact matches only. E.g. if your student number doesn t exist, the result of the vlookup will show as #N/A To return the closest match (next lowest value) and use that to return an answer. This option is only really used when working with ranges in the master data table. E.g. tax scales Note: unless you are working with financial data and number ranges, most VLOOKUPs use FALSE. Just imagine if you were pulling student data and you pulled the details of the nearest closest student? Chaos! 8 Click OK. Page 6 Last Updated Faye Brockwell

Comparing and linking tables of data using VLOOKUP Copy the VLOOKUP to the rest of the worksheet Use autofill to copy the VLOOKUP formula down the column 1 Select the cell(s) you want to copy. The fill handle will appear at the bottom right of the selection. 2 Point at the fill handle until it becomes a cross. 3 Click and drag to copy the data OR Double-click to autofill all rows. 4 Double click on one of the newly-populated cells within the column to check that the copied cell references are correct. https://staff.brighton.ac.uk/is/training/pages/excel/linking.aspx Page 7

University of Brighton Information Services Excercises Exercise A Fill in the gaps in the table above using one of the tables on the next page. Day Time Student number School 01/11/2011 10:00 11376481 01/11/2011 11:00 09286457 01/11/2011 13:00 09123456 01/11/2011 14:00 10348400 01/11/2011 15:00 10467935 02/11/2011 11:00 10374685 02/11/2011 13:00 11463856 02/11/2011 14:00 09342186 03/11/2011 10:00 09123456 04/11/2011 14:00 11376481 05/11/2011 13:00 10467935 Page 8 Last Updated Faye Brockwell

Comparing and linking tables of data using VLOOKUP Student number First name Surname DOB School 09123456 Faye Brockwell 11/08/1976 Education 10467935 Jill Shacklock 05/09/1971 Arts & Media 10374685 Brian McCarthy 11/11/1991 Nursing & Midwifery 11376481 Chris Searle 04/06/1990 Arts & Media 10267495 John Roberts 15/02/1989 Architecture & Design 10137401 Jane Dawes 08/07/1990 Engineering 11538467 Paul Hill 01/02/1991 CEM 09286457 Selwyn Percival 22/05/1989 Engineering 10348431 Adam Collett 26/09/1990 SASS 10846815 Dan Burgess 28/08/1990 Business School 09342186 Ben Wheelan 15/03/1987 Arts & Media 09438675 Pat Brown 12/12/1989 CEM 11463856 Ta King 07/10/1986 Education Student number First name Surname DOB School 09123456 Faye Brockwell 11/08/1976 Education 09286457 Selwyn Percival 22/05/1989 Engineering 09342186 Ben Wheelan 15/03/1987 Arts & Media 09438675 Pat Brown 12/12/1989 CEM 10137401 Jane Dawes 08/07/1990 Engineering 10267495 John Roberts 15/02/1989 Architecture & Design 10348431 Adam Collett 26/09/1990 SASS 10374685 Brian McCarthy 11/11/1991 Nursing & Midwifery 10467935 Jill Shacklock 05/09/1971 Arts & Media 10846815 Dan Burgess 28/08/1990 Business School 11376481 Chris Searle 04/06/1990 Arts & Media 11463856 Ta King 07/10/1986 Education 11538467 Paul Hill 01/02/1991 CEM https://staff.brighton.ac.uk/is/training/pages/excel/linking.aspx Page 9

University of Brighton Information Services 1 Which table did you use? Why? 2 Were you able to complete all the rows in the table? Exercise B 1 Open exercise file Student Services Example.xlsx The Interactions worksheet lists a Careers Adviser s interactions with students. The Students tab is a list of students by student number. 2 Prepare the data table on the Students worksheet to be used in a VLOOKUP. 3 Create a VLOOKUP in cell D5 on the Interactions worksheet to pull the school for that student in from the data table on the Students worksheet. 4 Copy the VLOOKUP down column D on the Interactions worksheet to populate the school for each row. As this table is not going to be uploaded into another system, there is no need to strip the VLOOKUP formulae in this exercise. Exercise C 1 Open exercise file Marks sheet exercise.xlsx The Marks worksheet lists student marks by module. The Grades & Check Digits tab is a table of grades and check digits for each mark. Note: The table on the Grades & Check Digits worksheet is an example of a marks sheet using one mark scheme. Do not use this table for real student marks. To obtain a similar table for your marks scheme, please contact CAMS support. 2 Prepare the data table on the Grades & Check Digits worksheet to be used in a VLOOKUP. 3 Create a VLOOKUP in cell K2 on the Marks worksheet to pull the grade for that student s mark in from the data table on the Grades & Check Digits worksheet. 4 Create a VLOOKUP in cell L2 on the Marks worksheet to pull the check digit for that student s mark in from the data table on the Grades & Check Digits worksheet. 5 Copy the VLOOKUP down columns K and L on the Marks worksheet to populate the grade and check digit for each row. Page 10 Last Updated Faye Brockwell

Comparing and linking tables of data using VLOOKUP Exercise D 1 Open exercise file Finance example using ranges.xlsx The Payroll worksheet lists staff and their pay scales. The Payroll Tables tab contains two tables: The hourly pay rate by pay scale The rate of income tax by salary 2 Prepare the data tables on the Payroll Tables worksheet to be used in a VLOOKUP. 3 Create a VLOOKUP in cell D5 on the Payroll worksheet to pull the hourly rate for that person s pay scale in from the data table on the Payroll Tables worksheet. 4 Copy the VLOOKUP down column D on the Payroll worksheet to populate the hourly rate for each row. 5 Create a VLOOKUP in cell G5 on the Payroll worksheet to pull the tax rate for that person in from the data table on the Payroll Tables worksheet. 6 Copy the VLOOKUP down column G on the Payroll worksheet to populate the tax rate for each row. https://staff.brighton.ac.uk/is/training/pages/excel/linking.aspx Page 11

University of Brighton Information Services Solutions Exercise A Solution Most people would choose the bottom of the 2 data tables in the exercise as it is sorted by student number, thus making it easier to read. No match can be found for student number 10348400. Day Time Student number School 01/11/2011 10:00 11376481 Arts & Media 01/11/2011 11:00 09286457 Engineering 01/11/2011 13:00 09123456 Education 01/11/2011 14:00 10348400 No match in the table 01/11/2011 15:00 10467935 Arts & Media 02/11/2011 11:00 10374685 Nursing & Midwifery 02/11/2011 13:00 11463856 Education 02/11/2011 14:00 09342186 Arts & Media 03/11/2011 10:00 09123456 Education 04/11/2011 14:00 11376481 Arts & Media 05/11/2011 13:00 10467935 Arts & Media Exercise B Solution 1 Open exercise file Student Services Example.xlsx 2 Click on the Students worksheet 3 Sort the data table: Click on any cell containing text in column A. Click on the Home tab, click on Sort & Filter and choose Sort A to Z. 4 Name the data table: Click anywhere in the table of data (a cell containing text) Press CTRL and A on the keyboard (or the Apple key and A on a Mac keyboard) Type a name for the table (e.g. student_table) in the Names Box Press Enter Page 12 Last Updated Faye Brockwell

Comparing and linking tables of data using VLOOKUP 5 Click on cell D5 on the Interactions tab 6 Type =VLOOKUP( 7 Click on the Build function icon 8 Click in the Lookup_value field and then click on cell C5 9 Click in the Table_array field and type the name of your data table (e.g. student_table) 10 Click in the Col_index_num field and type 5. 11 Click in the Range_lookup field and type FALSE and press OK 12 Use the autofill technique to copy the formula down the column (see page 5) Exercise C Solution 1 Open exercise file Marks sheet exercise.xlsx 2 Name the table on the Grades & Check Digits worksheet (the table is already sorted on column A) e.g. marks_table 3 Use the autofill technique to copy the formula down the column (see page 5) 4 Select columns K and L 5 On the Home tab, click on 6 On the Home tab, click on the drop-down arrow below the Paste icon https://staff.brighton.ac.uk/is/training/pages/excel/linking.aspx Page 13

University of Brighton Information Services 7 Click on Paste Values icon. 8 Double click on one of the cells in column K or L to check that the VLOOKUP function has been removed. Exercise D Solution 1 Open exercise file Finance example using ranges.xlsx 2 Name the Hourly Rate table (e.g. hourly_rate_table) 3 Name the Tax table (e.g. tax_table) 4 Use the autofill technique to copy the formula down the column (see page 5) 5 Use the autofill technique to copy the formula down the column (see page 5) Page 14 Last Updated Faye Brockwell