summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@libreoffice.org>2024-02-19 15:09:18 -0300
committerOlivier Hallot <olivier.hallot@libreoffice.org>2024-02-19 23:31:23 +0100
commit7d1418f79a28f5e38f65054b27f7062f77952e94 (patch)
treeb2f02d0933fddfad2fb10940a5acc4dcad39fab9
parent33a703440353008f3cb62855329e427ac41deedc (diff)
tdf#159771 Add XMATCH help page
Change-Id: Ieb8d83a73c6a598614ed5ac76004915fc6cf6de7 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/163603 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
-rw-r--r--AllLangHelp_scalc.mk1
-rw-r--r--source/text/scalc/01/func_xlookup.xhp25
-rw-r--r--source/text/scalc/01/func_xmatch.xhp47
3 files changed, 65 insertions, 8 deletions
diff --git a/AllLangHelp_scalc.mk b/AllLangHelp_scalc.mk
index 3f2110535f..86a6acff50 100644
--- a/AllLangHelp_scalc.mk
+++ b/AllLangHelp_scalc.mk
@@ -279,6 +279,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,scalc,\
helpcontent2/source/text/scalc/01/func_trunc \
helpcontent2/source/text/scalc/01/func_value \
helpcontent2/source/text/scalc/01/func_xlookup \
+ helpcontent2/source/text/scalc/01/func_xmatch \
helpcontent2/source/text/scalc/01/func_weekday \
helpcontent2/source/text/scalc/01/func_webservice \
helpcontent2/source/text/scalc/01/func_weeknum \
diff --git a/source/text/scalc/01/func_xlookup.xhp b/source/text/scalc/01/func_xlookup.xhp
index 8e718c0e9c..2b2499a17b 100644
--- a/source/text/scalc/01/func_xlookup.xhp
+++ b/source/text/scalc/01/func_xlookup.xhp
@@ -34,7 +34,9 @@
<paragraph role="paragraph" id="par_id241708281629922"><emph>Return</emph>: is the reference of the array or range to return.</paragraph>
<note id="par_id821708357634624">If <emph>Return</emph> is an array of values, the XLOOKUP function must be entered as an <link href="text/scalc/01/04060107.xhp#creating_array_formulas">array formula</link>.</note>
<paragraph role="paragraph" id="par_id271708281637035"><emph>NotFound</emph>: a text to return if the <emph>Lookup</emph> value is not found. If a valid match is not found, and <emph>NotFound</emph> is omitted, returns #N/A.</paragraph>
-<paragraph role="paragraph" id="par_id121708281643207"><emph>MatchType</emph>: Specify the match type:</paragraph>
+
+<section id="matchmode">
+ <paragraph role="paragraph" id="par_id121708281643207"><emph>MatchType</emph>: Specify the match type:</paragraph>
<list type="unordered">
<listitem>
<paragraph id="par_id111708281542144" role="listitem"><emph>0</emph> - Exact match (default). If <emph>Lookup</emph> value is not found and <emph>NotFound</emph> text is omitted, then return #N/A.</paragraph>
@@ -48,8 +50,11 @@
<listitem>
<paragraph id="par_id881708281558005" role="listitem"><emph>2</emph> - A <link href="text/scalc/guide/wildcards.xhp">wildcard</link> match where characters *, ?, and ~ have special meaning.</paragraph>
</listitem>
-</list>
-<paragraph role="paragraph" id="par_id871708281607313"><emph>SearchMode</emph>: Specify the search mode to use:</paragraph>
+ </list>
+</section>
+
+<section id="searchmode">
+ <paragraph role="paragraph" id="par_id871708281607313"><emph>SearchMode</emph>: Specify the search mode to use:</paragraph>
<list type="unordered">
<listitem>
<paragraph id="par_id281708281579757" role="listitem"><emph>1</emph>: - Search starting at the first item (default).</paragraph>
@@ -63,9 +68,11 @@
<listitem>
<paragraph id="par_id561708281595885" role="listitem"><emph>-2</emph> - Binary search that relies on <emph>Array</emph> being sorted in descending order. If not sorted, invalid results will be returned.</paragraph>
</listitem>
-</list>
+ </list>
+</section>
<embed href="text/scalc/01/ful_func.xhp#func_head_example"/>
-<paragraph role="paragraph" id="par_id961708354814163">The table below contains a glossary for translators:</paragraph>
+<section id="xfunc_example">
+ <paragraph role="paragraph" id="par_id961708354814163">The table below contains a glossary for translators:</paragraph>
<table id="tab_id951708353695721">
<tablerow>
<tablecell>
@@ -152,14 +159,16 @@
<paragraph id="par_id331708354377976" localize="false" role="tablecontent">開ける</paragraph>
</tablecell>
</tablerow>
-</table>
-<paragraph role="paragraph" id="par_id31708356677157"><input>={XLOOKUP("New", A2:A4, B2:E4,"Missing")}</input> returns the array {Nouveau,Nuovo,新しい}.</paragraph>
-<paragraph role="paragraph" id="par_id671708356683379"><input>={XLOOKUP("Reload", A2:A4, B2:E4,"Missing")}</input> returns the array {"Missing","Missing","Missing"}.</paragraph>
+ </table>
+</section>
+<paragraph role="paragraph" id="par_id31708356677157"><input>={XLOOKUP("New", A2:A4, B2:D4,"Missing")}</input> returns the array {"Nouveau","Nuovo","新しい"}.</paragraph>
+<paragraph role="paragraph" id="par_id671708356683379"><input>={XLOOKUP("Reload", A2:A4, B2:D4,"Missing")}</input> returns the array {"Missing","Missing","Missing"}.</paragraph>
<embed href="text/scalc/01/common_func.xhp#sectiontechinfo"/>
<embed href="text/scalc/00/avail_release.xhp#24.8"/>
<embed href="text/scalc/01/common_func.xhp#notODFF"/>
<paragraph role="paragraph" id="par_id341640870986703" localize="false"><literal>COM.MICROSOFT.XLOOKUP</literal></paragraph>
<section id="relatedtopics">
+ <paragraph role="paragraph" id="par_id31708365865376" localize="false"><embedvar href="text/scalc/01/func_xmatch.xhp#h1" markup="ignore"/></paragraph>
<tip id="par_id701677016751508"><link href="https://wiki.documentfoundation.org/Documentation/Calc_Functions/XLOOKUP">XLOOKUP wiki page</link>.</tip>
</section>
</body>
diff --git a/source/text/scalc/01/func_xmatch.xhp b/source/text/scalc/01/func_xmatch.xhp
new file mode 100644
index 0000000000..5a8d32ca7f
--- /dev/null
+++ b/source/text/scalc/01/func_xmatch.xhp
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<helpdocument version="1.0">
+ <!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ -->
+
+ <meta>
+ <topic id="textscalc01func_xmatchxhp" indexer="include" status="PUBLISH">
+ <title id="tit">XMATCH Function</title>
+ <filename>/text/scalc/01/func_xmatch.xhp</filename>
+ </topic>
+</meta>
+<body>
+<bookmark branch="hid/SC_HID_FUNC_XMATCH_MS" id="bm_id501708280229180" localize="false"/>
+<bookmark branch="index" id="bm_id361708283183878">
+ <bookmark_value>XMATCH function</bookmark_value>
+</bookmark>
+<section id="xmatch">
+ <h1 id="hd_id821708279355736"><variable id="h1"><link href="text/scalc/01/func_xmatch.xhp">XMATCH</link></variable></h1>
+ <paragraph id="par_id581708279355738" role="paragraph">Searches for a value in an array or range of cells and returns the relative position of the item.</paragraph>
+</section>
+<embed href="text/scalc/01/ful_func.xhp#func_head_syntax"/>
+<paragraph role="code" id="par_id211708281649651">XMATCH(Lookup; Array [; MatchType; SearchMode ] )</paragraph>
+<paragraph role="paragraph" id="par_id861708281340704"><emph>Lookup</emph>: The value of any type to search for in <emph>Array</emph>.</paragraph>
+<paragraph role="paragraph" id="par_id831708281625340"><emph>Array</emph>: is the reference of the array or range to search.</paragraph>
+<embed href="text/scalc/01/func_xlookup.xhp#matchmode"/>
+<embed href="text/scalc/01/func_xlookup.xhp#searchmode"/>
+<note id="par_id391708364611193">XMATCH outperforms function MATCH as it allows searches according to the search mode.</note>
+<embed href="text/scalc/01/ful_func.xhp#func_head_example"/>
+<embed href="text/scalc/01/func_xlookup.xhp#xfunc_example"/>
+<paragraph role="paragraph" id="par_id31708356677157"><input>=XMATCH("Save", A2:A4, 0, 1)</input> returns 2, the second line of the A2:A4 range.</paragraph>
+<embed href="text/scalc/01/common_func.xhp#sectiontechinfo"/>
+<embed href="text/scalc/00/avail_release.xhp#24.8"/>
+<embed href="text/scalc/01/common_func.xhp#notODFF"/>
+<paragraph role="paragraph" id="par_id341640870986703" localize="false"><literal>COM.MICROSOFT.XMATCH</literal></paragraph>
+<section id="relatedtopics">
+ <paragraph role="paragraph" id="par_id71708365909272" localize="false"><embedvar href="text/scalc/01/func_xlookup.xhp#h1" markup="ignore"/></paragraph>
+ <tip id="par_id701677016751508"><link href="https://wiki.documentfoundation.org/Documentation/Calc_Functions/XMATCH">XMATCH wiki page</link>.</tip>
+</section>
+</body>
+</helpdocument>
+