Work Documentary-31-Excel's VLookUp function associates search and merges two batches of data

Background: There are two batches of data, the first batch: the total number of tasks, the second batch: the number of completed tasks, and the task completion rate of each store needs to be calculated

1. Count the total number of tasks for each store through sql

insert image description here

2. Use sql to count the number of tasks completed in each store

insert image description here

3. Copy to excel respectively

insert image description here

4. Use the VLookUp function to associate according to the store

VLOOKUP(what to look for A2, where to look E:F, column number 2 in the range containing the value to return, returns an approximate or exact match expressed as 1/TRUE or 0/FALSE)

=VLOOKUP(A2,E:F,2,FALSE)
The third parameter: 2, the second column [F column] of the data in the red box [E:F], represents the store ID to be associated, fill it to [Completion rate] 】The column number
insert image description here
put the mouse on the C2 column and drag it down
insert image description here

5. Sort by the store column, you can compare the completion of the store at different times

insert image description here

Guess you like

Origin blog.csdn.net/u013553309/article/details/130517298