XLOOKUP Function - Microsoft Support
Maybe your like
Examples
Example 1 uses XLOOKUP to look up a country name in a range, and then return its telephone country code. It includes the lookup_value (cell F2), lookup_array (range B2:B11), and return_array (range D2:D11) arguments. It doesn't include the match_mode argument, as XLOOKUP produces an exact match by default.
Note: XLOOKUP uses a lookup array and a return array, whereas VLOOKUP uses a single table array followed by a column index number. The equivalent VLOOKUP formula in this case would be: =VLOOKUP(F2,B2:D11,3,FALSE)
———————————————————————————
Example 2 looks up employee information based on an employee ID number. Unlike VLOOKUP, XLOOKUP can return an array with multiple items, so a single formula can return both employee name and department from cells C5:D14.
———————————————————————————
Example 3 adds an if_not_found argument to the preceding example.
———————————————————————————
Example 4 looks in column C for the personal income entered in cell E2, and finds a matching tax rate in column B. It sets the if_not_found argument to return 0 (zero) if nothing is found. The match_mode argument is set to 1, which means the function will look for an exact match, and if it can't find one, it returns the next larger item. Finally, the search_mode argument is set to 1, which means the function will search from the first item to the last.
Note: XARRAY's lookup_array column is to the right of the return_array column, whereas VLOOKUP can only look from left-to-right.
———————————————————————————
Example 5 uses a nested XLOOKUP function to perform both a vertical and horizontal match. It first looks for Gross Profit in column B, then looks for Qtr1 in the top row of the table (range C5:F5), and finally returns the value at the intersection of the two. This is similar to using the INDEX and MATCH functions together.
Tip: You can also use XLOOKUP to replace the HLOOKUP function.
Note: The formula in cells D3:F3 is: =XLOOKUP(D2,$B6:$B17,XLOOKUP($C3,$C5:$G5,$C6:$G17)).
———————————————————————————
Example 6 uses the SUM function, and two nested XLOOKUP functions, to sum all the values between two ranges. In this case, we want to sum the values for grapes, bananas, and include pears, which are between the two.
The formula in cell E3 is: =SUM(XLOOKUP(B3,B6:B10,E6:E10):XLOOKUP(C3,B6:B10,E6:E10))
How does it work? XLOOKUP returns a range, so when it calculates, the formula ends up looking like this: =SUM($E$7:$E$9). You can see how this works on your own by selecting a cell with an XLOOKUP formula similar to this one, then select Formulas > Formula Auditing > Evaluate Formula, and then select Evaluate to step through the calculation.
Note: Thanks to Microsoft Excel MVP, Bill Jelen, for suggesting this example.
———————————————————————————
Tag » Where Is The Closest Range
-
Store Finder - Where To Find Us - The Range
-
Where Is My Nearest Store? - The Range
-
The Range - Furniture, Bedding, Curtains, Crafts, DIY, Garden & More
-
R: Finding The Nearest Range Neighbor
-
Find Closest Number To P In A Given Range Of Array - Stack Overflow
-
Whats The Closest Range For A Bow And Arrow To Be Effective ... - Quora
-
Approximate Range Closest-pair Queries - ScienceDirect
-
What Is The Closest Distance A Human Being Has Come To Mars Ever ...
-
The Closest Distance Of The Origin From A Curve Given As - Toppr
-
Map Of Toptracer Range Locations Around The World
-
Hotels Near Micro Range Golf - Singapore - TripAdvisor
-
Closest Number From A Range Of Numbers - UNIX And Linux Forums
-
Find A Decathlon Sports Store Near You