Introduction to Excel's VLOOKUP() function

Introduction to Excel's VLOOKUP() function

Excel's VLOOKUP function syntax:

VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])

Parameter Description:

lookup_value: The value to look up or the value to compare.

table_array: The area containing the data table to lookup in.

col_index_num: The index number of the column where the value to be returned is located, counting from the first column of table_array.

range_lookup: optional parameter indicating whether to perform approximate matching. If TRUE (or omit this parameter), an approximate match will be performed by default; if FALSE, only an exact match will be performed.

concise grammar form

VLOOKUP(what to look up, range of data to look up, column number in the range containing the value to return, FALSE)

Official Documentation VLOOKUP Function - Microsoft Support

Precautions

1. Find directions

Vlookup is a vertical lookup function. The word vertical defines the search direction of the vlookup function. You cannot look up data based on columns. If you need to look up data based on columns, you need to use the hlookup function, which is a horizontal lookup function. Parameters It is exactly the same as vlookup, and the usage method is similar.

2. Data area to avoid duplication

Use vlookup to find data. When duplicate values ​​are encountered, the function will only return the first found result.

3. The lookup value must be in the first column of the data area to be looked up

4. Absolute reference to the data area to be looked up

The second parameter of the Vlookup function, the absolute reference of the data area to be looked up is recommended to be set to an absolute reference, otherwise the data area to be looked up may change when the formula is dragged down to expand the data. The $ symbol in front of the cell position numbers and letters is an absolute reference.

Application examples are given below

The sample data is shown in the figure below. For example, here we want to find the English scores of the next few students Zhang Xiaofei, Chang E, and Wang Ce.

See the picture below, in cell I2 only need to set the formula as:

=VLOOKUP(H2,$B$1:$E$8,3,FALSE)

The first parameter: H2, is the name of the search value.

The second parameter: $B$2:$E$8, the data area to be searched, the search value must be in the first column of the data area. Use absolute references.

The third parameter: 3, counting from the name column to the right in the data area, the English score is in the fourth column, so set it to 3.

The fourth parameter: false, which means an exact match, and if the result cannot be found, the function will return an error value.

Then, fill the formula down to I5.

【Excel formula how to pull down to fill

After using the formula to calculate a result, locate the cell where the formula is used to calculate the result (click the cell containing the formula with the mouse), and do one of the following:

Double-click the mouse to achieve quick drop-down filling: use the mouse to double-click the "ten" symbol in the lower right corner of the cell;

Manually pull down to fill: press down the mouse and drag the "cross" symbol through the desired cell, then release the mouse.

After completion, the effect is as follows:

With this foundation, you can learn more usage of the VLOOKUP function, see:

16 classic usages of VLOOKUP function https://zhuanlan.zhihu.com/p/619570724

Guess you like

Origin blog.csdn.net/cnds123/article/details/131814018