Using Vookup in Excel - Compensation Insider Sunday Skills

14
USING V-LOOKUP IN EXCEL http://CompensationInsider.com

description

This function allows you to import data from one file to another, like a copy/paste but when the 2 files don't have the same number of rows, for example with employee data as of 2 different dates.Very useful for importing information when preparing for compensation surveys for example.Check out my blog : http://CompensationInsider.com if you are interested in Compensation & Benefits and want to receive free "technical" tips every other Sunday.

Transcript of Using Vookup in Excel - Compensation Insider Sunday Skills

Page 1: Using Vookup in Excel  - Compensation Insider Sunday Skills

USING V-LOOKUP IN EXCEL

http://CompensationInsider.com

Page 2: Using Vookup in Excel  - Compensation Insider Sunday Skills

The problem

You have 2 Excel files with one needing some of the information from the other to be complete. The 2 files have some similar information but a simple cut/paste will not work.

For example : Employee data file as of May 1st, with employee address. The other file has employee data as of August 1st, and includes nationality. You need to include nationality in the first file but between May and August, some employees left and others were hired so you can’t just copy/paste nationality into the first file easily. The risk of error in manual copying is too great and it takes too much time.

Page 3: Using Vookup in Excel  - Compensation Insider Sunday Skills

The solution

The V-lookup function in Excel allows you to “copy” data from one column from the source file into the main file, using a common piece of info that it will “look up” into both files to import only information that is relevant.

For example, using the employee ID number as common piece of info, it will import Nationality into the file with the address. It will skip employees who are not present into both files.

Page 4: Using Vookup in Excel  - Compensation Insider Sunday Skills

Uses and advantages of vlookup You can use this to participate in compensation

surveys, for example if your bonus information is in a different file from salary and allowances information.

Vlookup imports the data into your main file and once it’s done you only need to check the employees with N/A result because they are present in the main file but not in the source file (where you import from) : they are usually new hires or employees who left or transferred.

You save time compared to a normal copy/paste, reduce error risks, and focus only on particular cases.

Page 5: Using Vookup in Excel  - Compensation Insider Sunday Skills

Important preliminary actions Identify the common denominator between

the 2 files and make sure it is identical. In Compensation & Benefits, I recommend to

use Employee ID because this number never changes. (Name spelling can vary from one file to another, female employees may change their name when getting married or divorced).

Ensure both files are ordered in the same manner (eg : file is ordered by employee name from A to Z or employee ID smallest to largest)

Page 6: Using Vookup in Excel  - Compensation Insider Sunday Skills

Important preliminary actions cont’d Assuming file A is where you want to import data

(main file) and file B is where you are taking the data from (source file).

In file B, count the “column number” of the data you want to import with respect to the common identifier. “Column number 1” is the column which has the common identifier. For example : Employee ID is in column A, Nationality is

in Column B, the “column number” of Nationality is 2 For example, Employee ID is in column C, Nationality in

in column G, the “column number” of Nationality is 5

Page 7: Using Vookup in Excel  - Compensation Insider Sunday Skills

Step 1 – Select “vlookup” into Excel functions (fx), where you want to insert the nationality into the main file

Page 8: Using Vookup in Excel  - Compensation Insider Sunday Skills

Step 2 - Fill in the blanks

Page 9: Using Vookup in Excel  - Compensation Insider Sunday Skills

What each field means

Lookup value : is the common identifier, selected in file A / main file (where you want to import the data to)

Table Array : is the selection of columns in file B (source file), from common denominator (Employee ID) to the data to import (Nationality). Simply go to file B and select the columns. In our example go to Nationality tab and select columns A to D.

Col index num : is the “column number” of the data you want to import. In our example, type 4

Range lookup : always type False

Page 10: Using Vookup in Excel  - Compensation Insider Sunday Skills

Step 3 - You will see the result on the screen, click OK

Page 11: Using Vookup in Excel  - Compensation Insider Sunday Skills

Step 4 – Extend to the whole column and you’re done

Page 12: Using Vookup in Excel  - Compensation Insider Sunday Skills

Results – pay attention

As you noticed, the file reported “N/A” for Claudette because she is not in the August file where we imported the data from. She may have left the company for example, or be transferred to another department.

The import also did not copy data for Issam, present in August (we have Nationality for him) but not in May. He may be a new hire or have been transferred in from another department.

Page 13: Using Vookup in Excel  - Compensation Insider Sunday Skills

Recommended – not mandatory I recommend doing a copy/paste special

> Values of the imported data so that you can then “play” with your main file without messing the vlookup.

You can then easily filter the file and focus only on the employees with “N/A” results : they are the ones which are into your main file but not into the file with the data to be imported so you’ll have to search the info in a different way for them

Page 14: Using Vookup in Excel  - Compensation Insider Sunday Skills

Want to know more ?

© Sandrine Bardot and CompensationInsider.com 2011

On my blog CompensationInsider.com, I share Excel, social media, presentation and other useful “technical” tips for Compensation & Benefits and HR professionals, every other Sunday. I also cover C&B topics and career advice the rest of the week. Feel free to check it out and subscribe by email or RSS.

Find out more about me and why I started this blog.