[Graphic] How to use the vlookup function in Excel

For today's statistics, I used the vlookup function in Excel. Of course, Baidu was the first time I used it. After repeated research, the problem was solved, and it is now organized into documents.

1. Realize the effect


Sheet1 Sheet2 Note: The product barcode column (ie column D) of sheet1 in the above figure refers to the data in the product barcode (ie column B) in sheet2
 

 
 
 


2. Description of vlookup function call


Taking the calling function in sheet1 as an example, the usage of the vlookup function is as follows:


=VLOOKUP(A2,Sheet2!$A$2:$B$100,2,TRUE)

There are four call parameters in the function

1) The first parameter: A2: It can be specified arbitrarily, or it can be B2, C2, etc. It is best not to have the same value in this column, it is mainly used as a serial number column, and the content can be numbers or letters.

2) The second parameter: Sheet2!$A$2:$B$100 : the data table to find the data

►Sheet2: For the form that needs to get the content.

►$A$2: It can also be written as A2, but the purpose of adding $ is that it can be dynamically assigned. After writing the VLOOKUP function in the first cell, just drag it down, and the contents of all the cells below can be filled automatically (see Figure 1). Here A is the serial number column in sheet2. The content of the column value needs to be the same as the content of the serial number column specified in the first parameter of VLOOKUP, in order to assign a value to the cell that calls the VLOOKUP function, otherwise an error of #N/A occurs ( See Figure 2).

►$B$100: B is the content column to be obtained (the product barcode in sheet2), 100 is the maximum of 100 pieces of data to be obtained
 
3) The third parameter: refers to the column serial number of the matching value to be returned, that is, the B column in the rendering sheet2, which is the second column, so fill in 2 for the parameter here.

4) The fourth parameter: TRUE or not filled, the serial number column (ie: the first parameter A column) must be sorted from small to large, such as 1, 2, 3, 4. . . Otherwise no data can be found


Appendix:
 
Figure 1 and
 
 
 
 
Figure 2 are 
 



reproduced, please indicate the starting address: http://www.itxxz.com/a/gaoji/2014/0622/102.html

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326645093&siteId=291194637