Application Scenario: recently, it has encountered some problems when processing table data. I want to put the data corresponding to table 2 in table 1. The ID of table 2 is out of order (if it looks nice, it will be in order .), It is troublesome to copy and paste the functions one by one. After the master instructs you to use the Vlookup function, you can see the height of this function.
Copy Baidu:
We often need to query the data in a table, which can be easily obtained from another table. In this case, we need to use the Vlookup function, a very practical function in Excel.
The Vlookup function searches for the specified value in the first column of a table or numeric array, and returns the value at the specified column in the row where the value is located in the table or array.
For example, Figure 1 is a complete data source, and figure 2's salary column data is empty. What we need to do is to transfer the salary data in table sheet1 to table sheet2.
Figure 1 Figure 2
In table C2 of table sheet2 (empty row under salary), we can write:
=VLOOKUP(A2,Sheet1!$A$2:$C$14,3,0)
In this case, the number 1000 is displayed, which is the same as that of sheet1.
The Vlookup function has four parameters.
The first parameter: The value pair to be searched. Who is it? A2, which is the value of ID 100. (Who are you looking ?)
The second parameter is the search range of a pair. Where can I find it based on the above parameters? Sheet1! $ A $2: $ C $14. In this case, search for the range A2 to C14 in the sheet1 table. This is set based on the number of rows in the table sheet1. (Where can I find it ?)
The third parameter: After finding it, what content will be pasted from the sheet1 table to the sheet2 table? This parameter is expressed by the number of columns in the table. Number 3: Haha, that is, paste the content of the third column in sheet1 to sheet2. (What to paste after finding it ?)
The fourth parameter: 0 indicates exact match. 1 indicates fuzzy search. Generally, enter 0.
After writing these functions, we can hold down the fill handle drop-down in the first column to see the correct matching data.
I would like to ask if there is any automatic drop-down filling. I processed a data record of 50 million and pulled the data for a long time.