[Knowledge Rabbit Excel Tutorial] 4 application skills of Xlookup, case interpretation

Regarding query references, in addition to Lookup, Vlookup, and Hlookup, Xlookup can also be used. However, Xlookup can only be applied in Office 365 and higher versions of WPS. This article uses WPS as an example to explain.

Function: Finds the contents of a table or range by row, then returns the first value corresponding to the match, or the closest match if there is no match.

Syntax structure: =Xlookup(lookup value, lookup value data range, return value data range, [fault tolerance value], [matching mode], [query mode]).

Interpretation of parameters:

1. Fault tolerance value: optional, if no valid matching item is found, the specified "fault tolerance value" will be returned; if no valid matching item is found, and the parameter is defaulted, then "#N/ A".

2. Matching mode: optional, there are 4 types.

0: Exact match, which is also the default value, if not found, #N/A will be returned.

-1: Exact match, if not found, returns the next smaller item.

1: Exact match: if not found, return the next larger item.

2: Fuzzy matching (wildcard matching): ? (question mark) matches a single character; * (asterisk) matches characters of any length; ~ (tilde): search? (question mark), * (asterisk), or ~ (tilde).

3. Query mode: optional, there are 3 types.

1: The default option, the search is performed from the first item.

-1: Perform the search starting from the last item.

2: Binary search that depends on the parameter "Find Value Data Range" sorted in ascending (descending) order, if it is sorted, invalid results will be returned.


1. Regular inquiries.

Purpose: Query the corresponding "monthly salary" according to the "employee name".

method:

Enter the formula in the destination cell: =XLOOKUP(K3,B3:B12,H3:H12).

Interpretation: Lesson 558! Office essentials! The whole process of excellent courses for Excel Xiaobai to transform into a master - Knowledge Rabbit

1. In the formula, K3 is "search value", B3:B12 is "search value data range", H3:H12 is "return value data range".

2. The meaning of the formula is: query the value equal to J3 from B3:B12 from top to bottom , and return the corresponding monthly salary in the cell range H3:H12.

3. How to reflect "from top to bottom" and "equal to" in the meaning of the formula:

In the formula syntax structure, the parameter "match mode" can be omitted. When omitted, it will be "exact match", that is, "equal to". The parameter "query mode" can also be omitted. When omitted, the search will be performed from the first item , a "top-to-bottom" query.


Second, the reverse query.

Purpose: Query the corresponding "employee name" according to the "employee number".

method:

Enter the formula in the destination cell: =XLOOKUP(K3,C3:C12,B3:B12).

Interpretation: Lesson 558! Office essentials! The whole process of excellent courses for Excel Xiaobai to transform into a master - Knowledge Rabbit

In the Xlookup function, the "query value data area" and "return value data area" are separated, so there is no need to consider the query direction.


Three, automatic debugging.

Purpose: Return the corresponding "Monthly Salary" according to the "Employee Name". If the information cannot be queried, return a null value.

method:

Enter the formula in the destination cell: =XLOOKUP(K3,B3:B12,H3:H12,"").

Interpretation:

The fourth parameter of the Xlookup function is the "fault tolerance value", that is, the specified return value when the "lookup value" cannot be found in the "lookup value data range"; the value specified in the formula is a null value.


Fourth, fuzzy query.

Purpose: Query the corresponding "employee name" according to the "employee number".

method:

Enter the formula in the destination cell: =XLOOKUP(K3,C3:C12,B3:B12,,-1) or =XLOOKUP(K3,C3:C12,B3:B12,,1).

Interpretation: Lesson 558! Office essentials! The whole process of excellent courses for Excel Xiaobai to transform into a master - Knowledge Rabbit

The "matching mode" of function Xlookup has 4 values, when the value is -1 (1), the next smaller (bigger) value is returned, so when the "work number" is "Excel-007", "matching mode" When it is -1, return "Mrs. Gan"; when it is 1, return "Sun Shangxiang".


Conclusion:

About the 4 classic application skills of Xlookup, the editor will report here. Compared with functions such as Lookup and Vlookup, which application technique of Xlookup do you prefer, please tell the editor in the message area!

おすすめ

転載: blog.csdn.net/zhishitu0/article/details/124892390