# Data aggregation

## What is the VLOOKUP function?

The VLOOKUP function allows you to go search for a value in a table. The "V" stands for Vertical: this function will look for structured data columns, which is almost always the case (there is also the lesser used HLOOKUP)

In general, this function allows you to combine data from different tables in a single order to make analyses more effective

## Example of the use of the VLOOKUP function

Let's say that you need to analyze a contact list containing phone numbers. You have a correlation table between dialling code and country. Using VLOOKUP will allow you to know quickly where your contacts are from, according to their dialling code

## VLOOKUP function Syntax

The VLOOKUP function uses 4 parameters :

• This is the data that will allow us to locate the information that interests us in the table. In this example it is the dialling code located in cell C2. This setting is usually referred to as the search key

• This is the table where you will find the data: the first column must contain the look up key (code here). In this example, it is the matrix F6:G21

In general we tend to copy the VLOOKUP across multiple cells. It is a good habit to "block" the area with \$. In the example above it is not absolutely necessary, but it does not cost anything and it allows to avoid mistakes: therefore the matrix uses: \$F\$6:\$G\$21

• This is the index of the column in which the target value is: in this example it is the name of the country which is found in the second column of the matrix of the Source Data. Column numbering starts at 1 with the first column of Source Data.

• This parameter is equal to True or False: it determines if Excel accepts approximate values​​. This notion is not clear in Excel, so the easiest way is to always set this parameter to FALSE to avoid errors