search
HomeTopicsexcelSummarize and organize the usage of XLOOKUP function

This article brings you relevant knowledge about excel, which mainly introduces some typical uses of the XLOOKUP function. The syntax is "=XLOOKUP(search value, search range, result range, [ Fault tolerance value], [matching method], [query mode])", I hope it will be helpful to everyone.

Summarize and organize the usage of XLOOKUP function

Related learning recommendations: excel tutorial

Today I would like to share with you some typical uses of the XLOOKUP function.

This function can currently only be used in Office 365 and WPS 2021. The function syntax is:

=XLOOKUP(查找值,查找范围,结果范围,[容错值],[匹配方式],[查询模式])

The first three parameters are required, and the following parameters can be omitted.

Next, let’s take a look at some typical uses of this function:

1. Regular query

As shown in the figure below, according to the department of G1, in column A Query the department and return the name of the corresponding person in column B. The formula is:

=XLOOKUP(G1,A2:A11,B2:B11)

Summarize and organize the usage of XLOOKUP function

The first parameter is the query content, and the second parameter is the query area. You only need to select one column for the query area. The third parameter is the content of which column to return, and you only need to select one column.

The meaning of the formula is to find the department specified in cell G1 in the cell range A2:A11, and return the corresponding name in the cell range B2:B11.

2. Reverse query

Since the query area and return area of ​​the XLOOKUP function are two separate parameters, there is no need to consider the direction of the query. Not only can it be achieved from left to right, You can also query in any direction from right to left, bottom to top, top to bottom, etc.

As shown in the figure below, according to the department of G1, query the department in column B and return the name of the person in charge corresponding to column A. The formula is:

=XLOOKUP(G1,B2:B11,A2:A11)

Summarize and organize the usage of XLOOKUP function

3. Returning multiple columns

If you want to return the content in different columns based on the specified query content, it is also very simple.

As shown in the figure below, according to the department of cell G1, the name, date and sales amount corresponding to the department are returned. The formula is:

=XLOOKUP(G1,A2:A11,B2:D11)

The third parameter in this formula selects the range of multiple columns. Since the formulas in Office 365 have an overflow function, you only need to enter a formula to return multiple pieces of information in columns B~D.

Summarize and organize the usage of XLOOKUP function

4. Automatic debugging

The XLOOKUP function also comes with Shuanghuanglian. When the content cannot be queried, you can specify the prompt information to be returned.

As shown below, the XLOOKUP function cannot query the "Daxing Store" in cell G1 in column A. At this time, as long as you add a parameter, the formula will no longer return the error value #N/A.

=XLOOKUP(G1,A2:A11,B2:D11,"No such data")

The fourth parameter is used to specify the prompt content returned when the result cannot be found.

Summarize and organize the usage of XLOOKUP function

As shown below, according to the taxable income in cell F1, query the corresponding estimate in the comparison table on the left Discount rates and quick calculation deductions. The formula is:

=XLOOKUP(F2,B2:B8,C2:D8,0,-1)

XLOOKUP queries the value of F2 in column B. The fifth parameter uses -1, which means that if it cannot be found, the next smaller value will be returned from the query area.

If the fifth parameter is 1, if the query value cannot be found, the next larger value in the query area will be returned.

Summarize and organize the usage of XLOOKUP function

Another cool thing about this usage is that the query area does not need to be sorted in advance. For example, in the table below, the values ​​in column B are out of order:

Summarize and organize the usage of XLOOKUP function

If wildcards are used in the query value, remember to select 2 for the fifth parameter.

Summarize and organize the usage of XLOOKUP function

The XLOOKUP function also has a sixth parameter. If there are two qualified results in the data source, the sixth parameter is set to 1 to return the first result. Set to -1 returns the last result.

Related learning recommendations: excel tutorial

The above is the detailed content of Summarize and organize the usage of XLOOKUP function. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:Excel Home. If there is any infringement, please contact admin@php.cn delete
MEDIAN formula in Excel - practical examplesMEDIAN formula in Excel - practical examplesApr 11, 2025 pm 12:08 PM

This tutorial explains how to calculate the median of numerical data in Excel using the MEDIAN function. The median, a key measure of central tendency, identifies the middle value in a dataset, offering a more robust representation of central tenden

Google Spreadsheet COUNTIF function with formula examplesGoogle Spreadsheet COUNTIF function with formula examplesApr 11, 2025 pm 12:03 PM

Master Google Sheets COUNTIF: A Comprehensive Guide This guide explores the versatile COUNTIF function in Google Sheets, demonstrating its applications beyond simple cell counting. We'll cover various scenarios, from exact and partial matches to han

Excel shared workbook: How to share Excel file for multiple usersExcel shared workbook: How to share Excel file for multiple usersApr 11, 2025 am 11:58 AM

This tutorial provides a comprehensive guide to sharing Excel workbooks, covering various methods, access control, and conflict resolution. Modern Excel versions (2010, 2013, 2016, and later) simplify collaborative editing, eliminating the need to m

How to convert Excel to JPG - save .xls or .xlsx as image fileHow to convert Excel to JPG - save .xls or .xlsx as image fileApr 11, 2025 am 11:31 AM

This tutorial explores various methods for converting .xls files to .jpg images, encompassing both built-in Windows tools and free online converters. Need to create a presentation, share spreadsheet data securely, or design a document? Converting yo

Excel names and named ranges: how to define and use in formulasExcel names and named ranges: how to define and use in formulasApr 11, 2025 am 11:13 AM

This tutorial clarifies the function of Excel names and demonstrates how to define names for cells, ranges, constants, or formulas. It also covers editing, filtering, and deleting defined names. Excel names, while incredibly useful, are often overlo

Standard deviation Excel: functions and formula examplesStandard deviation Excel: functions and formula examplesApr 11, 2025 am 11:01 AM

This tutorial clarifies the distinction between standard deviation and standard error of the mean, guiding you on the optimal Excel functions for standard deviation calculations. In descriptive statistics, the mean and standard deviation are intrinsi

Square root in Excel: SQRT function and other waysSquare root in Excel: SQRT function and other waysApr 11, 2025 am 10:34 AM

This Excel tutorial demonstrates how to calculate square roots and nth roots. Finding the square root is a common mathematical operation, and Excel offers several methods. Methods for Calculating Square Roots in Excel: Using the SQRT Function: The

Google Sheets basics: Learn how to work with Google SpreadsheetsGoogle Sheets basics: Learn how to work with Google SpreadsheetsApr 11, 2025 am 10:23 AM

Unlock the Power of Google Sheets: A Beginner's Guide This tutorial introduces the fundamentals of Google Sheets, a powerful and versatile alternative to MS Excel. Learn how to effortlessly manage spreadsheets, leverage key features, and collaborate

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software