summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@libreoffice.org>2024-05-16 17:07:52 -0300
committerOlivier Hallot <olivier.hallot@libreoffice.org>2024-05-20 22:25:55 +0200
commit2662257ca9594a0c5fc1371c8e397f562c726f8c (patch)
tree72e12c749ee8dd89f45076e6dc17db2cff6d3219 /source
parentcbb8c2d8d957f8a4729b32ac098c8a88f72d797a (diff)
tdf#159872 UNIQUE function help page
- Attempt to address issues raised by Regina. Change-Id: I85892d15a5bf8bb798f733cd4fddc309e5906894 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/167755 Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org> Tested-by: Jenkins
Diffstat (limited to 'source')
-rw-r--r--source/text/scalc/01/04060101.xhp7
-rw-r--r--source/text/scalc/01/func_unique.xhp37
2 files changed, 39 insertions, 5 deletions
diff --git a/source/text/scalc/01/04060101.xhp b/source/text/scalc/01/04060101.xhp
index bd0864fb72..d68e5ec716 100644
--- a/source/text/scalc/01/04060101.xhp
+++ b/source/text/scalc/01/04060101.xhp
@@ -104,8 +104,8 @@
<h3 id="hd_id3150329">Examples of Database Function Use</h3>
<paragraph id="par_id3153713" role="paragraph">The following table provides an example database table that is utilized to demonstrate how to use the functions in the Database category. The cell range A1:E10 contains fictitious information about the guests invited to Joe's birthday party. The following information is given for each guest - name, school grade, age in years, distance to school in meters, and weight in kilograms.</paragraph>
-
- <table id="tbl_id3159264">
+<section id="tbl_database_sample">
+ <table id="tbl_711715981358741">
<tablerow>
<tablecell/>
<tablecell>
@@ -339,7 +339,8 @@
<tablecell>
</tablecell>
</tablerow>
- </table>
+ </table>
+ </section>
<paragraph role="paragraph" id="par_id221616245476190">The following six examples use the database table above, combined with different search criteria areas.</paragraph>
diff --git a/source/text/scalc/01/func_unique.xhp b/source/text/scalc/01/func_unique.xhp
index 0d7025e841..8c709cfb44 100644
--- a/source/text/scalc/01/func_unique.xhp
+++ b/source/text/scalc/01/func_unique.xhp
@@ -22,11 +22,44 @@
</bookmark>
<section id="unique">
<h1 id="hd_id901708806478126"><variable id="h1"><link href="text/scalc/01/func_unique.xhp">UNIQUE</link></variable></h1>
- <paragraph id="par_id771708806478128" role="paragraph">(...)</paragraph>
+ <paragraph id="par_id771708806478128" role="paragraph">Returns the array of unique values from a range or array of values.</paragraph>
</section>
+
+<note id="par_id711715953325962">The UNIQUE function is always case sensitive, independent from the setting of <emph>Case sensitive</emph> checkbox in <switchinline select="sys"><caseinline select="MAC"><menuitem>%PRODUCTNAME - Preferences</menuitem></caseinline><defaultinline><menuitem>Tools - Options</menuitem></defaultinline></switchinline> - <link href="text/shared/optionen/01060500.xhp"><menuitem>%PRODUCTNAME Calc - Calculate</menuitem></link>.</note>
+
<embed href="text/scalc/01/ful_func.xhp#func_head_syntax"/>
-<paragraph role="code" id="par_id211708281649651">UNIQUE(...)</paragraph>
+<paragraph role="code" id="par_id211708281649651">UNIQUE(Array, [By col], [Uniqueness])</paragraph>
+<paragraph role="paragraph" id="par_id381715698113514"><emph>Array</emph>: the range or array from which to return unique values.</paragraph>
+<paragraph role="paragraph" id="par_id311715698119400"><emph>By col</emph>: (optional) a logical value that indicates how to compare data: TRUE - compares data horizontally for a match of all cells in each column, across all columns. FALSE or omitted (default) - compares data vertically, for a match of all cells of each row, across all rows.</paragraph>
+
+<paragraph role="paragraph" id="par_id531715698124705"><emph>Uniqueness</emph>: (optional) A logical value that defines which values are considered unique. TRUE returns values that occur only once. The default is FALSE or omitted, which returns all distinct values in the range or array.</paragraph>
+<note id="par_id501715889339407">The UNIQUE function must be entered as an <link href="text/scalc/01/04060107.xhp#creating_array_formulas">array formula</link>.</note>
<embed href="text/scalc/01/ful_func.xhp#func_head_example"/>
+<paragraph role="paragraph" id="par_id471715980557106">Given the data table below, the examples returns unique occurrences of grades and age.</paragraph>
+<embed href="text/scalc/01/04060101.xhp#tbl_database_sample"/>
+<h3 id="hd_id931715984553129">Example 1</h3>
+<paragraph role="paragraph" id="par_id641715980827372"><input>{=UNIQUE(B1:C10,FALSE(),FALSE())}</input> returns the array below. The grades and ages of the rows with name Andy and Harry are returned only once. The same for rows with name Eva and Irene.</paragraph>
+<table id="sample1">
+ <tablerow><tablecell><paragraph role="paragraph" id="par_id641715983343641"><emph>Grade</emph></paragraph></tablecell><tablecell><paragraph role="paragraph" id="par_id511715983350731"><emph>Age</emph></paragraph></tablecell></tablerow>
+ <tablerow><tablecell><paragraph role="paragraph" id="par_id751715983361251" localize="false">3</paragraph></tablecell><tablecell><paragraph role="paragraph" id="par_id51715983367115" localize="false">9</paragraph></tablecell></tablerow>
+ <tablerow><tablecell><paragraph role="paragraph" id="par_id791715983372155" localize="false">4</paragraph></tablecell><tablecell><paragraph role="paragraph" id="par_id301715983377588" localize="false">10</paragraph></tablecell></tablerow>
+ <tablerow><tablecell><paragraph role="paragraph" id="par_id521715983383178" localize="false">3</paragraph></tablecell><tablecell><paragraph role="paragraph" id="par_id881715983388786" localize="false">10</paragraph></tablecell></tablerow>
+ <tablerow><tablecell><paragraph role="paragraph" id="par_id1001715983394307" localize="false">5</paragraph></tablecell><tablecell><paragraph role="paragraph" id="par_id451715983399066" localize="false">11</paragraph></tablecell></tablerow>
+ <tablerow><tablecell><paragraph role="paragraph" id="par_id451715983403906" localize="false">2</paragraph></tablecell><tablecell><paragraph role="paragraph" id="par_id191715983413378" localize="false">8</paragraph></tablecell></tablerow>
+ <tablerow><tablecell><paragraph role="paragraph" id="par_id641715983418937" localize="false">2</paragraph></tablecell><tablecell><paragraph role="paragraph" id="par_id311715983438778" localize="false">7</paragraph></tablecell></tablerow>
+ <tablerow><tablecell><paragraph role="paragraph" id="par_id391715983424898" localize="false">1</paragraph></tablecell><tablecell><paragraph role="paragraph" id="par_id951715983443729" localize="false">7</paragraph></tablecell></tablerow>
+</table>
+<h3 id="hd_id981715984567844">Example 2</h3>
+<paragraph role="paragraph" id="par_id801715981230387"><input>{=UNIQUE(B1:C10,FALSE(),TRUE())}</input>, with <emph>Uniqueness</emph> as TRUE. Returns the array below with the rows of Andy, Harry, Eva and Irene omitted because their combined grades and ages are not unique.</paragraph>
+<table id="sample2">
+ <tablerow><tablecell><paragraph role="paragraph" id="par_id501715983764524"><emph>Grade</emph></paragraph></tablecell><tablecell><paragraph role="paragraph" id="par_id31715983773608"><emph>Age</emph></paragraph></tablecell></tablerow>
+ <tablerow><tablecell><paragraph role="paragraph" id="par_id611715983782594" localize="false">4</paragraph></tablecell><tablecell><paragraph role="paragraph" id="par_id671715983787993" localize="false">10</paragraph></tablecell></tablerow>
+ <tablerow><tablecell><paragraph role="paragraph" id="par_id11715983792601" localize="false">3</paragraph></tablecell><tablecell><paragraph role="paragraph" id="par_id441715983798113" localize="false">10</paragraph></tablecell></tablerow>
+ <tablerow><tablecell><paragraph role="paragraph" id="par_id311715983802580" localize="false">5</paragraph></tablecell><tablecell><paragraph role="paragraph" id="par_id611715983807760" localize="false">11</paragraph></tablecell></tablerow>
+ <tablerow><tablecell><paragraph role="paragraph" id="par_id591715983811913" localize="false">2</paragraph></tablecell><tablecell><paragraph role="paragraph" id="par_id971715983820239" localize="false">7</paragraph></tablecell></tablerow>
+ <tablerow><tablecell><paragraph role="paragraph" id="par_id551715983827423" localize="false">1</paragraph></tablecell><tablecell><paragraph role="paragraph" id="par_id171715983833462" localize="false">7</paragraph></tablecell></tablerow>
+</table>
+
<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"/>