Excel cascade multi-table queries vlookup

Work excel repeatedly used the cascade multi-table queries, similar to sql statement:

update table set col = value where 'query'

Inside the function. Always forget how to use, record it.

Reference to this Web site:

https://www.cnblogs.com/Lamfai/p/9848937.html

1349745-20181025113708914-1949588122.png

Formula: In the C2 input "= VLOOKUP (B2, E1: G4,2,1)", the pull-down filling. For me, better understanding with the following sql statement.

update xx set C2 = (select F from E1: G4 where E1: G4 = B2), after understanding, rote or better some of :)

  Tip: the VLOOKUP (lookup data, column order, [matching condition]) = the VLOOKUP (what find: B2, where to look: E1: G4, return to the first column: 2,1: approximate match)

    Find: Find the value of monthly consumption level;

    Data: E1 range data table is to G4;

    Number of columns: 2 refers to the column F [month] consumer groups;

    Matching condition: 0 / FALSE an exact match, 1 / TRUE approximate match.

In actual use, we found several places need special attention:

1, the second parameter is a range, that range needs to contain the contents of the first column of the first parameter need to find. Such as the above example, the threshold value of this column, to be placed in the first column, otherwise it can not be found;

2, if the return: # N / A (data not find instructions), or does not find a value, it is possible to find the value in front of, behind the space;

3, if the return: # N / A (data not find instructions), found during pulldown, which value is incremented by the formula, the range is moved backward, resulting in no corresponding data can be inserted in front of the second table a sufficient number of rows blank lines, in order to make the form visible, hide the blank line.





Guess you like

Origin blog.51cto.com/yuweibing/2460116