xref: /AOO41X/main/helpcontent2/source/text/scalc/guide/validity.xhp (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?>
2*cdf0e10cSrcweir
3*cdf0e10cSrcweir
4*cdf0e10cSrcweir<!--***********************************************************************
5*cdf0e10cSrcweir *
6*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7*cdf0e10cSrcweir *
8*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates.
9*cdf0e10cSrcweir *
10*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite
11*cdf0e10cSrcweir *
12*cdf0e10cSrcweir * This file is part of OpenOffice.org.
13*cdf0e10cSrcweir *
14*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify
15*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3
16*cdf0e10cSrcweir * only, as published by the Free Software Foundation.
17*cdf0e10cSrcweir *
18*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful,
19*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of
20*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details
22*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code).
23*cdf0e10cSrcweir *
24*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License
25*cdf0e10cSrcweir * version 3 along with OpenOffice.org.  If not, see
26*cdf0e10cSrcweir * <http://www.openoffice.org/license.html>
27*cdf0e10cSrcweir * for a copy of the LGPLv3 License.
28*cdf0e10cSrcweir *
29*cdf0e10cSrcweir ************************************************************************-->
30*cdf0e10cSrcweir
31*cdf0e10cSrcweir
32*cdf0e10cSrcweir<helpdocument version="1.0">
33*cdf0e10cSrcweir<meta>
34*cdf0e10cSrcweir<topic id="textscalcguidevalidityxml" indexer="include" status="PUBLISH">
35*cdf0e10cSrcweir<title id="tit" xml-lang="en-US">Validity of Cell Contents</title>
36*cdf0e10cSrcweir<filename>/text/scalc/guide/validity.xhp</filename>
37*cdf0e10cSrcweir</topic>
38*cdf0e10cSrcweir<history>
39*cdf0e10cSrcweir<created date="2003-10-31T00:00:00">Sun Microsystems, Inc.</created>
40*cdf0e10cSrcweir<lastedited date="2006-03-07T11:48:35">converted from old format - fpe</lastedited>
41*cdf0e10cSrcweir</history>
42*cdf0e10cSrcweir</meta>
43*cdf0e10cSrcweir<body>
44*cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="index" id="bm_id3156442"><bookmark_value>values; limiting on input</bookmark_value>
45*cdf0e10cSrcweir<bookmark_value>limits; specifying value limits on input</bookmark_value>
46*cdf0e10cSrcweir<bookmark_value>permitted cell contents</bookmark_value>
47*cdf0e10cSrcweir<bookmark_value>data validity</bookmark_value>
48*cdf0e10cSrcweir<bookmark_value>validity</bookmark_value>
49*cdf0e10cSrcweir<bookmark_value>cells; validity</bookmark_value>
50*cdf0e10cSrcweir<bookmark_value>error messages; defining for incorrect input</bookmark_value>
51*cdf0e10cSrcweir<bookmark_value>actions in case of incorrect input</bookmark_value>
52*cdf0e10cSrcweir<bookmark_value>Help tips; defining text for cell input</bookmark_value>
53*cdf0e10cSrcweir<bookmark_value>comments;help text for cells</bookmark_value>
54*cdf0e10cSrcweir<bookmark_value>cells; defining input help</bookmark_value>
55*cdf0e10cSrcweir<bookmark_value>macros; running when incorrect input</bookmark_value>
56*cdf0e10cSrcweir<bookmark_value>data; validity check</bookmark_value>
57*cdf0e10cSrcweir</bookmark><comment>mw changed "limit...;"</comment>
58*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3156442" xml-lang="en-US" level="1" l10n="U" oldref="22"><variable id="validity"><link href="text/scalc/guide/validity.xhp" name="Validity of Cell Contents">Validity of Cell Contents</link>
59*cdf0e10cSrcweir</variable></paragraph>
60*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3156283" xml-lang="en-US" l10n="U" oldref="2">For each cell, you can define entries to be valid. Invalid entries to a cell will be rejected.</paragraph>
61*cdf0e10cSrcweir<paragraph role="warning" id="par_id3145252" xml-lang="en-US" l10n="U" oldref="3">The validity rule is activated when a new value is entered. If an invalid value has already been inserted into the cell, or if you insert a value in the cell either with drag-and-drop or by copying and pasting, the validity rule will not take effect.</paragraph>
62*cdf0e10cSrcweir<paragraph role="note" id="par_id5174718" xml-lang="en-US" l10n="NEW">You can choose <emph>Tools - Detective</emph> at any time and choose the command <link href="text/scalc/01/06030800.xhp" name="Mark Invalid Data"><emph>Mark Invalid Data</emph></link> to display which cells contain invalid values.</paragraph>
63*cdf0e10cSrcweir<paragraph role="heading" id="hd_id3155603" xml-lang="en-US" level="2" l10n="U" oldref="5">Using Cell Contents Validity</paragraph>
64*cdf0e10cSrcweir<list type="ordered">
65*cdf0e10cSrcweir<listitem>
66*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3155959" xml-lang="en-US" l10n="U" oldref="6">Select the cells for which you want to define a new validity rule.</paragraph>
67*cdf0e10cSrcweir</listitem>
68*cdf0e10cSrcweir<listitem>
69*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3148837" xml-lang="en-US" l10n="U" oldref="8">Choose <item type="menuitem">Data - Validity</item>. </paragraph>
70*cdf0e10cSrcweir</listitem>
71*cdf0e10cSrcweir<listitem>
72*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3156020" xml-lang="en-US" l10n="U" oldref="9">On the <emph>Criteria</emph> tab page, enter the conditions for new values entered into cells. </paragraph>
73*cdf0e10cSrcweir</listitem>
74*cdf0e10cSrcweir<listitem>
75*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3159208" xml-lang="en-US" l10n="U" oldref="10">In the <emph>Allow</emph> field, select an option.</paragraph>
76*cdf0e10cSrcweir</listitem>
77*cdf0e10cSrcweir<listitem>
78*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3153011" xml-lang="en-US" l10n="U" oldref="11">If you select "Whole Numbers", values such as "12.5" are not allowed. Choosing "Date" allows date information both in the local date format as well as in the form of a <link href="text/sbasic/shared/03030101.xhp" name="serial date">serial date</link>. Similarly, the "Time" condition permits time values such as "12:00" or serial time numbers. "Text Length" stipulates that cells are allowed to contain text only.</paragraph>
79*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id9224829" xml-lang="en-US" l10n="NEW">Select "List" to enter a list of valid entries.</paragraph>
80*cdf0e10cSrcweir</listitem>
81*cdf0e10cSrcweir<listitem>
82*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3149317" xml-lang="en-US" l10n="U" oldref="13">Select the next condition under <emph>Data</emph>. According to what you choose, additional options will be selectable.</paragraph>
83*cdf0e10cSrcweir</listitem>
84*cdf0e10cSrcweir</list>
85*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3151389" xml-lang="en-US" l10n="U" oldref="15">After you have determined the conditions for cell validity, you can use the other two tab pages to create message boxes:</paragraph>
86*cdf0e10cSrcweir<list type="unordered">
87*cdf0e10cSrcweir<listitem>
88*cdf0e10cSrcweir<paragraph role="listitem" id="par_id3159261" xml-lang="en-US" l10n="U" oldref="16">On the <emph>Input Help</emph> tab page, enter the title and the text of the tip, which will then be displayed if the cell is selected.</paragraph>
89*cdf0e10cSrcweir</listitem>
90*cdf0e10cSrcweir<listitem>
91*cdf0e10cSrcweir<paragraph role="listitem" id="par_id3156396" xml-lang="en-US" l10n="U" oldref="17">On the <emph>Error Alert</emph> tab page, select the action to be carried out in the event of an error.</paragraph>
92*cdf0e10cSrcweir<paragraph role="listitem" id="par_id3147416" xml-lang="en-US" l10n="U" oldref="18">If you select "Stop" as the action, invalid entries are not accepted, and the previous cell contents are retained.</paragraph>
93*cdf0e10cSrcweir<paragraph role="listitem" id="par_id3150033" xml-lang="en-US" l10n="U" oldref="19">Select "Warning" or "Information" to display a dialog in which the entry can either be canceled or accepted.</paragraph>
94*cdf0e10cSrcweir<paragraph role="listitem" id="par_id3149947" xml-lang="en-US" l10n="U" oldref="20">If you select "Macro", then by using the <emph>Browse</emph> button you can specify a macro to be run in the event of an error.</paragraph>
95*cdf0e10cSrcweir</listitem>
96*cdf0e10cSrcweir</list>
97*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3149011" xml-lang="en-US" l10n="U" oldref="35">To display the error message, select <emph>Show error message when invalid values are entered</emph>. </paragraph>
98*cdf0e10cSrcweir<embed href="text/scalc/01/12120300.xhp#examplemakro"/>
99*cdf0e10cSrcweir<paragraph role="note" id="par_id3148586" xml-lang="en-US" l10n="U" oldref="21">After changing the action for a cell on the <emph>Error Alert</emph> tab page and closing the dialog with OK, you must first select another cell before the change takes effect.</paragraph>
100*cdf0e10cSrcweir<section id="relatedtopics">
101*cdf0e10cSrcweir<paragraph role="paragraph" id="par_id3154805" xml-lang="en-US" l10n="U" oldref="30"><link href="text/scalc/01/12120000.xhp" name="Data - Validity">Data - Validity</link></paragraph>
102*cdf0e10cSrcweir</section>
103*cdf0e10cSrcweir</body>
104*cdf0e10cSrcweir</helpdocument>
105