summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortagezi <lera.goncharuk@gmail.com>2015-10-12 19:48:10 +0300
committerCaolán McNamara <caolanm@redhat.com>2015-10-14 08:03:50 +0000
commitbd002743972148b9a2dca39248e9f0f406c34eea (patch)
treec4f02cefa10eb94db2ef9e89a753045ebb2fb785
parent0b6f8089829c49f01e35ce7bb11d5e0e0dfc70f2 (diff)
Added description the ERROR.TYPE function
func_error_type.xhp is NEW and contains the description maybe, need to add more good examples AllLangHelp_scalc.mk added the link to the file 04060109.xhp added the link to name and description on the function Change-Id: Ic178c3198ffa91bf02dcf611013347ca7814ab30 Reviewed-on: https://gerrit.libreoffice.org/19361 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--AllLangHelp_scalc.mk1
-rw-r--r--source/text/scalc/01/04060109.xhp4
-rw-r--r--source/text/scalc/01/func_error_type.xhp129
3 files changed, 134 insertions, 0 deletions
diff --git a/AllLangHelp_scalc.mk b/AllLangHelp_scalc.mk
index 0c180cab86..09735b862e 100644
--- a/AllLangHelp_scalc.mk
+++ b/AllLangHelp_scalc.mk
@@ -194,6 +194,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,scalc,\
helpcontent2/source/text/scalc/01/func_eastersunday \
helpcontent2/source/text/scalc/01/func_edate \
helpcontent2/source/text/scalc/01/func_eomonth \
+ helpcontent2/source/text/scalc/01/func_error_type \
helpcontent2/source/text/scalc/01/func_hour \
helpcontent2/source/text/scalc/01/func_minute \
helpcontent2/source/text/scalc/01/func_month \
diff --git a/source/text/scalc/01/04060109.xhp b/source/text/scalc/01/04060109.xhp
index 0abddba139..aab9735357 100644
--- a/source/text/scalc/01/04060109.xhp
+++ b/source/text/scalc/01/04060109.xhp
@@ -178,6 +178,10 @@
oldref="44">Example</paragraph>
<paragraph xml-lang="en-US" id="par_id3146904" role="paragraph" l10n="U" oldref="45">If cell A1 displays Err:518, the function <item type="input">=ERRORTYPE(A1)</item> returns the number 518.</paragraph>
</section>
+<section id="error_type">
+<paragraph id="hd_id275141466817507" role="heading" level="2" localize="false" xml-lang="en-US"><embedvar href="text/scalc/01/func_error_type.xhp#error_type_head"/></paragraph>
+<paragraph id="par_id164731033513430" role="paragraph" localize="false" xml-lang="en-US"><embedvar href="text/scalc/01/func_error_type.xhp#error_type_des"/></paragraph>
+</section>
<section id="Section5">
<bookmark xml-lang="en-US" branch="index" id="bm_id3151221"><bookmark_value>INDEX function</bookmark_value>
</bookmark>
diff --git a/source/text/scalc/01/func_error_type.xhp b/source/text/scalc/01/func_error_type.xhp
new file mode 100644
index 0000000000..4933739fc9
--- /dev/null
+++ b/source/text/scalc/01/func_error_type.xhp
@@ -0,0 +1,129 @@
+<?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_error_typexml">
+ <title id="tit" xml-lang="en-US">ERROR.TYPE function</title>
+ <filename>text/scalc/01/func_error_type.xhp</filename>
+ </topic>
+</meta>
+
+<body>
+
+<section id="error_type_function">
+<bookmark xml-lang="en-US" branch="hid/SC_HID_FUNC_ERROR_TYPE_ODF" id="bm_id346023460234602" localize="false"/>
+<bookmark xml-lang="en-US" branch="index" id="bm_id346793467934679">
+ <bookmark_value>ERROR.TYPE function</bookmark_value>
+ <bookmark_value>index of the Error type</bookmark_value>
+</bookmark>
+
+<paragraph id="hd_id348223482234822" role="heading" level="2" xml-lang="en-US"><variable id="error_type_head"><link href="text/scalc/01/func_error_type.xhp">ERROR.TYPE</link></variable> function</paragraph>
+<paragraph id="par_id350283502835028" role="paragraph" xml-lang="en-US"><ahelp hid="."><variable id="error_type_des">Returns a number representing a specific Error type, or the error value #N/A, if there is no error. </variable></ahelp></paragraph>
+</section>
+
+<paragraph id="hd_id351323513235132" role="heading" level="3" xml-lang="en-US">Syntax</paragraph>
+<paragraph id="par_id1861223540440" role="code" xml-lang="en-US">ERROR.TYPE(Error_value)</paragraph>
+<paragraph id="par_id217737315" role="paragraph" xml-lang="en-US"><emph>Error_value</emph> – required argument. The error value or a reference to a cell, whose value needs to be processed.</paragraph>
+
+<table id="func_error_type_des_table">
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id15254419018421" role="tablehead" xml-lang="en-US">Error value</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id134093102310948" role="tablehead" xml-lang="en-US">Returns</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id121020152053105891" role="tablecontent" xml-lang="en-US">Err:511</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id121020152052446273" role="tablecontent" localize="false" xml-lang="en-US">1</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id121020152053148760" role="tablecontent" xml-lang="en-US">#DIV/0!</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id121020152052481542" role="tablecontent" localize="false" xml-lang="en-US">2</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id121020152053296785" role="tablecontent" xml-lang="en-US">#VALUE!</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id121020152052517316" role="tablecontent" localize="false" xml-lang="en-US">3</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id121020152053329868" role="tablecontent" xml-lang="en-US">#REF!</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id121020152052546364" role="tablecontent" localize="false" xml-lang="en-US">4</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id121020152053353976" role="tablecontent" xml-lang="en-US">#NAME?</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id121020152052574920" role="tablecontent" localize="false" xml-lang="en-US">5</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id121020152053408216" role="tablecontent" xml-lang="en-US">#NUM!</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id121020152052596412" role="tablecontent" localize="false" xml-lang="en-US">6</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id121020152054007072" role="tablecontent" xml-lang="en-US">#N/A</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id121020152053027085" role="tablecontent" localize="false" xml-lang="en-US">7</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id121020152054075191" role="tablecontent" xml-lang="en-US">Anything else</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="" role="tablecontent" xml-lang="en-US">#N/A</paragraph>
+ </tablecell>
+ </tablerow>
+</table>
+<embed href="text/scalc/01/ODFF.xhp#odff"/>
+
+<paragraph id="hd_id352113521135211" role="heading" level="3" xml-lang="en-US">Examples</paragraph>
+<paragraph id="hd_id182972884627444" role="heading" level="4" xml-lang="en-US">Simple usage</paragraph>
+<paragraph id="par_id15812966716957" role="paragraph" xml-lang="en-US"><item type="input">=ERROR.TYPE(#N/A)</item></paragraph>
+<paragraph id="par_id280533214928308" role="paragraph" xml-lang="en-US">Returns 7, because 7 is the index number of the error value #N/A.</paragraph>
+<paragraph id="par_id1047088636291" role="paragraph" xml-lang="en-US"><item type="input">=ERROR.TYPE(A3)</item></paragraph>
+<paragraph id="par_id24308515918391" role="paragraph" xml-lang="en-US">If A3 contains an expression equivavlent to the division by zero, the function returns 2, because 2 is the index number of the error value #DIV/0!</paragraph>
+<paragraph id="hd_id9842206115046" role="heading" level="4" xml-lang="en-US">More advanced way</paragraph>
+<paragraph id="par_id90121141327448" role="paragraph" xml-lang="en-US">If in division A1 by A2, A2 can turn to zero, you can handle the situation as follows:</paragraph>
+<paragraph id="par_id16083887218317" role="paragraph" xml-lang="en-US"><item type="input">=IF(ISERROR(A1/A2);IF(ERROR.TYPE(A1/A2)=2;"the denominator can't be equal to zero");A1/A2)</item></paragraph>
+<paragraph id="par_id12475201719494" role="paragraph" xml-lang="en-US">The ISERROR function returns TRUE or FALSE depending on whether there is an error or not. If the error takes place, the function IF addresses to the second argument, if there is no error, it returns the result of the division. The second argument checks the index number representing the specific Error type, and if it is equal to 2, it returns the specified text "the denominator can't be zero" or 0 otherwise. Thus, clear text would signify the division by zero, the result of the division would appear when the division is successful, or if there is, for example, an error of another type, zero would be returned.</paragraph>
+<paragraph id="par_id26251175451270" role="warning" xml-lang="en-US">If the ERROR.TYPE function is used as condition of the IF function and the ERROR.TYPE returns #N/A, the IF function returns #N/A as well. Use ISERROR to avoid it as shown in the example above.</paragraph>
+<section id="relatedtopics">
+<paragraph id="par_id352953529535295" role="paragraph" xml-lang="en-US"><link href="text/scalc/01/04060104.xhp#iserror">ISERROR</link>, <link href="text/scalc/01/04060104.xhp#na">NA</link>, <link href="text/scalc/01/04060104.xhp#Section4">IF</link></paragraph>
+<paragraph id="par_id312932390024933" role="paragraph" localize="false" xml-lang="en-US"><link href="text/scalc/05/02140000.xhp" name="Error codes">Error codes</link></paragraph>
+</section>
+</body>
+
+</helpdocument> \ No newline at end of file