The built-in function VLOOKUP is one of the most powerful functions in Excel. It belongs to the three most popular in Excel — after SUM and AVERAGE. Her task is to find the desired value in the data table and display it in the specified cell.
The function syntax includes a lookup value (what you're looking for), a table with one or more columns (where to look), a column index number (from which column to return data), and a lookup type (an additional argument that lets you choose an approximate or exact result).
The VLOOKUP function is commonly used for financial analysis, data management, and working with databases. Using this feature, users can quickly and easily find information in a large data set, which can save time and improve accuracy.
The VLOOKUP function looks for values vertically, that is, among rows (this is indicated by the first letter V - Vertical). In Excel, there is also a similar function HLOOKUP, which has a similar functionality, but makes a horizontal (H - Horizontal) search by columns.
Suppose we have two tables with data - loan table and collateral table :
We need to automatically insert collateral into the loan table, based on the agreement number, for further reporting.
In Excel in the standard set of functions in the category Lookup and reference is a function VLOOKUP . This function looks for the specified value (in our example, the agreement number) in the leftmost column of the specified table (security table) moving from top to bottom and, finding them, displays the value of the adjacent cell (type of credit security). Schematically, the operation of the function looks like this:
So, let's use the function VLOOKUP . Select the cell where it will be entered ( E2 ) and open the formula wizard (menu Insert - Function ). In the category (Lookup and Reference) find the function VLOOKUP and press OK . A window will appear for entering function arguments:
Fill them in one by one:
It remains to press OK and copy the entered function across the entire column.
The main disadvantage is that the search for the desired value can only take place in the first column of the given range, and the function can return the desired value only from the columns to the right.
The second disadvantage of VLOOKUP is that the function stops working if you remove or add a column to the lookup table. An inserted or deleted element will change the result of the formula because the function syntax requires that you specify the entire range and the specific column number from which you want to extract data.
Also, the VLOOKUP function has a lookup length limit of 255 characters, otherwise the #VALUE error will be returned!
Function VLOOKUP returns an error (#N/A) if:
To suppress the error message (#N/A) , when the function cannot find an exact match, you can use the function IFERROR . This function checks if an error (#N/A) is the result of work VLOOKUP , and if so, outputs an empty tape ( "" ) or zero, if not - the result of the work VLOOKUP .