mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 21:30:34 +08:00
110 lines
5.3 KiB
HTML
110 lines
5.3 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>XLOOKUP Function</title>
|
|
<meta charset="utf-8" />
|
|
<meta name="description" content="" />
|
|
<link type="text/css" rel="stylesheet" href="../../../../../../common/main/resources/help/editor.css" />
|
|
<link type = "text/css" rel = "stylesheet" href = "../../images/sprite.css" />
|
|
<script type="text/javascript" src="../callback.js"></script>
|
|
<script type="text/javascript" src="../../../../../../common/main/resources/help/search/js/page-search.js"></script>
|
|
</head>
|
|
<body>
|
|
<div class="mainpart">
|
|
<div class="search-field">
|
|
<input id="search" class="searchBar" placeholder="Search" type="text" onkeypress="doSearch(event)">
|
|
</div>
|
|
<h1>XLOOKUP Function</h1>
|
|
<p>The <b>XLOOKUP</b> function is one of the <a href="../UsageInstructions/InsertFunction.htm#lookupreference" onclick="onhyperlinkclick(this)">lookup and reference functions</a>. It is used to perform the search for a specific item by row both horizontally and vertically. The result is returned in another column and can accommodate two-dimensional datasets.</p>
|
|
<h3>Syntax</h3>
|
|
<p><b><em>XLOOKUP (lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])</em></b></p>
|
|
<p>The <b>XLOOKUP</b> function has the following arguments:</p>
|
|
<table style="width: 40%">
|
|
<tr>
|
|
<th style="background-color: #f4f4f4" width="150ch"><b>Argument</b></th>
|
|
<th style="background-color: #f4f4f4"><b>Description</b></th>
|
|
</tr>
|
|
<tr>
|
|
<td><b><em>lookup_value</em></b></td>
|
|
<td>A value to search for.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><b><em>lookup_array</em></b></td>
|
|
<td>An array or range to search in.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><b><em>return_array</em></b></td>
|
|
<td>An array or range to return the results to.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><b><em>if_not_found</em></b></td>
|
|
<td>An optional argument. If there is no search result, the argument returns the text stated in [if_not_found]. In case the text is not specified, the “N/A” is returned.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><b><em>match_mode</em></b></td>
|
|
<td>An optional argument. The possible values are listed in the table below.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><b><em>search_mode</em></b></td>
|
|
<td>An optional argument. The possible values are listed in the table below.</td>
|
|
</tr>
|
|
</table>
|
|
<p>The <b><em>match_mode</em></b> argument can be one of the following:</p>
|
|
<table style="width: 40%">
|
|
<tr>
|
|
<th style="background-color: #f4f4f4"><b>Value</b></th>
|
|
<th style="background-color: #f4f4f4"><b>Description</b></th>
|
|
</tr>
|
|
<tr>
|
|
<td><b><em>0</em></b></td>
|
|
<td>Set by default. Returns the exact match; if there is no match, the “N/A” is returned instead.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><b><em>-1</em></b></td>
|
|
<td>Returns the exact match; if there is none, the next smaller item is returned.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><b><em>1</em></b></td>
|
|
<td>Returns the exact match; if there is none, the next larger item is returned.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><b><em>2</em></b></td>
|
|
<td>A wildcard match.</td>
|
|
</tr>
|
|
</table>
|
|
<p>The <b><em>search_mode</em></b> argument can be one of the following:</p>
|
|
<table style="width: 40%">
|
|
<tr>
|
|
<th style="background-color: #f4f4f4"><b>Value</b></th>
|
|
<th style="background-color: #f4f4f4"><b>Description</b></th>
|
|
</tr>
|
|
<tr>
|
|
<td><b><em>1</em></b></td>
|
|
<td>Set by default. Starts a search at the first item.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><b><em>-1</em></b></td>
|
|
<td>Starts a reverse search, i.e. at the last item.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><b><em>2</em></b></td>
|
|
<td>Starts a binary search with the <b><em>lookup_array</em></b> sorted in ascending order. If not sorted, invalid results will be returned.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><b><em>-2</em></b></td>
|
|
<td>Starts a binary search with the <b><em>lookup_array</em></b> sorted in descending order. If not sorted, invalid results will be returned.</td>
|
|
</tr>
|
|
</table>
|
|
<h3>Notes</h3>
|
|
<p>
|
|
Wildcard characters include the question mark (?) that matches a single character and the asterisk (*) that matches multiple characters. If you want to find a question mark or asterisk, type a tilde (~) before the character.
|
|
</p>
|
|
<p>Please note that this is an array formula. To learn more, please read the <a href="../UsageInstructions/InsertArrayFormulas.htm" onclick="onhyperlinkclick(this)">Insert array formulas</a> article.</p>
|
|
<p><a href="../UsageInstructions/InsertFunction.htm#applyfunction" onclick="onhyperlinkclick(this)">How to apply</a> the <b>XLOOKUP</b> function.</p>
|
|
|
|
<h3>Examples</h3>
|
|
<p>The figure below displays the result returned by the <b>XLOOKUP</b> function.</p>
|
|
<p><img alt="XLOOKUP Function" src="../images/xlookup.png" /></p>
|
|
</div>
|
|
</body>
|
|
</html> |