xref: /AOO41X/main/helpcontent2/source/text/scalc/guide/value_with_name.xhp (revision 67e470dafe1997e73f56ff7ff4878983707e3e07)
1cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?>
2cdf0e10cSrcweir<helpdocument version="1.0">
3cdf0e10cSrcweir
4*ce44d6c1SAndrew Rist<!--***********************************************************
5cdf0e10cSrcweir *
6*ce44d6c1SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
7*ce44d6c1SAndrew Rist * or more contributor license agreements.  See the NOTICE file
8*ce44d6c1SAndrew Rist * distributed with this work for additional information
9*ce44d6c1SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
10*ce44d6c1SAndrew Rist * to you under the Apache License, Version 2.0 (the
11*ce44d6c1SAndrew Rist * "License"); you may not use this file except in compliance
12*ce44d6c1SAndrew Rist * with the License.  You may obtain a copy of the License at
13cdf0e10cSrcweir *
14*ce44d6c1SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
15cdf0e10cSrcweir *
16*ce44d6c1SAndrew Rist * Unless required by applicable law or agreed to in writing,
17*ce44d6c1SAndrew Rist * software distributed under the License is distributed on an
18*ce44d6c1SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19*ce44d6c1SAndrew Rist * KIND, either express or implied.  See the License for the
20*ce44d6c1SAndrew Rist * specific language governing permissions and limitations
21*ce44d6c1SAndrew Rist * under the License.
22cdf0e10cSrcweir *
23*ce44d6c1SAndrew Rist ***********************************************************-->
24*ce44d6c1SAndrew Rist
25*ce44d6c1SAndrew Rist
26cdf0e10cSrcweir
27cdf0e10cSrcweir
28cdf0e10cSrcweir<meta>
29cdf0e10cSrcweir      <topic id="textscalcguidevalue_with_namexml" indexer="include" status="PUBLISH">
30cdf0e10cSrcweir         <title xml-lang="en-US" id="tit">Naming Cells</title>
31cdf0e10cSrcweir         <filename>/text/scalc/guide/value_with_name.xhp</filename>
32cdf0e10cSrcweir      </topic>
33cdf0e10cSrcweir   </meta>
34cdf0e10cSrcweir   <body>
35cdf0e10cSrcweir<bookmark xml-lang="en-US" branch="index" id="bm_id3147434"><bookmark_value>cells; defining names</bookmark_value>
36cdf0e10cSrcweir      <bookmark_value>names; defining for cells</bookmark_value>
37cdf0e10cSrcweir      <bookmark_value>values; defining names</bookmark_value>
38cdf0e10cSrcweir      <bookmark_value>constants definition</bookmark_value>
39cdf0e10cSrcweir      <bookmark_value>variables; defining names</bookmark_value>
40cdf0e10cSrcweir      <bookmark_value>cell ranges; defining names</bookmark_value>
41cdf0e10cSrcweir      <bookmark_value>defining;names for cell ranges</bookmark_value>
42cdf0e10cSrcweir      <bookmark_value>formulas; defining names</bookmark_value>
43cdf0e10cSrcweir      <bookmark_value>addressing; by defined names</bookmark_value>
44cdf0e10cSrcweir      <bookmark_value>cell names; defining/addressing</bookmark_value>
45cdf0e10cSrcweir      <bookmark_value>references; by defined names</bookmark_value>
46cdf0e10cSrcweir      <bookmark_value>allowed cell names</bookmark_value>
47cdf0e10cSrcweir      <bookmark_value>renaming;cells</bookmark_value>
48cdf0e10cSrcweir</bookmark><comment>mw changed "names;...", "addressing;..." and "references,..."  entries.</comment><comment>mw added "renaming;"</comment>
49cdf0e10cSrcweir<paragraph xml-lang="en-US" id="hd_id3147434" role="heading" level="1" l10n="U" oldref="1"><variable id="value_with_name"><link href="text/scalc/guide/value_with_name.xhp" name="Naming Cells">Naming Cells</link>
50cdf0e10cSrcweir</variable></paragraph>
51cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="hd_id4391918" role="heading" level="2" l10n="NEW">Allowed names</paragraph>
52cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="par_id2129581" role="paragraph" l10n="NEW">Names in Calc can contain letters, numeric characters, and some special characters. Names must start with a letter or an underline character.</paragraph>
53cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="par_id1120029" role="paragraph" l10n="NEW">Allowed special characters:</paragraph>
54cdf0e10cSrcweir      <list type="unordered">
55cdf0e10cSrcweir         <listitem>
56cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id3362224" role="paragraph" l10n="NEW">underline (_) </paragraph>
57cdf0e10cSrcweir         </listitem>
58cdf0e10cSrcweir         <listitem>
59cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id4891506" role="paragraph" l10n="NEW">period (.) - allowed within a name, but not as first or last character</paragraph>
60cdf0e10cSrcweir         </listitem>
61cdf0e10cSrcweir         <listitem>
62cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id2816553" role="paragraph" l10n="NEW">blank ( ) - allowed within a name, but not as first or last character, and not for a cell range</paragraph>
63cdf0e10cSrcweir         </listitem>
64cdf0e10cSrcweir      </list>
65cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="par_id328989" role="paragraph" l10n="NEW">Names must not be the same as cell references. For example, the name A1 is invalid because A1 is a cell reference to the top left cell.</paragraph>
66cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="par_id32898987" role="paragraph" l10n="NEW">Names must not start with the letter R followed by a number. See the ADDRESS function for more information.</paragraph>
67cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="par_id4769737" role="paragraph" l10n="NEW">Names for cell ranges must not include blanks. Blanks are allowed within names for single cells, sheets and documents.</paragraph>
68cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="hd_id1226233" role="heading" level="2" l10n="NEW">Naming cells and formulas</paragraph>
69cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="par_id5489364" role="paragraph" l10n="NEW">A good way of making the references to cells and cell ranges in formulas legible is to give the ranges names. For example, you can name the range A1:B2 <emph>Start</emph>. You can then write a formula such as "=SUM(Start)". Even after you insert or delete rows or columns, $[officename] still correctly assigns the ranges identified by name. Range names must not contain any spaces.</paragraph>
70cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="par_id953398" role="paragraph" l10n="NEW">For example, it is much easier to read a formula for sales tax if you can write "= Amount * Tax_rate" instead of "= A5 * B12". In this case, you would name cell A5 "Amount" and cell B12 "Tax_rate."</paragraph>
71cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="par_id4889675" role="paragraph" l10n="NEW">Use the <emph>Define Names</emph> dialog to define names for formulas or parts of formulas you need more often. In order to specify range names,</paragraph>
72cdf0e10cSrcweir      <list type="ordered">
73cdf0e10cSrcweir         <listitem>
74cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id3153954" role="listitem" l10n="U" oldref="3">Select a cell or range of cells, then choose <emph>Insert - Names - Define</emph>. The <emph>Define Names</emph> dialog appears.</paragraph>
75cdf0e10cSrcweir         </listitem>
76cdf0e10cSrcweir         <listitem>
77cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id3156283" role="listitem" l10n="U" oldref="4">Type the name of the selected area in the <emph>Name</emph> field. Click <emph>Add</emph>. The newly defined name appears in the list below. Click OK to close the dialog.</paragraph>
78cdf0e10cSrcweir         </listitem>
79cdf0e10cSrcweir      </list>
80cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="par_id5774101" role="paragraph" l10n="NEW">You can also name other cell ranges in this dialog by entering the name in the field and then selecting the respective cells.</paragraph>
81cdf0e10cSrcweir      <paragraph xml-lang="en-US" id="par_id3154942" role="paragraph" l10n="U" oldref="5">If you type the name in a formula, after the first few characters entered you will see the entire name as a tip.</paragraph>
82cdf0e10cSrcweir      <list type="unordered">
83cdf0e10cSrcweir         <listitem>
84cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id3154510" role="listitem" l10n="U" oldref="6">Press the Enter key in order to accept the name from the tip.</paragraph>
85cdf0e10cSrcweir         </listitem>
86cdf0e10cSrcweir         <listitem>
87cdf0e10cSrcweir            <paragraph xml-lang="en-US" id="par_id3150749" role="listitem" l10n="U" oldref="7">If more than one name starts with the same characters, you can scroll through all the names using the Tab key.<comment>mw copied contents from Calc guide address_byname.xhp</comment></paragraph>
88cdf0e10cSrcweir         </listitem>
89cdf0e10cSrcweir      </list>
90cdf0e10cSrcweir      <section id="relatedtopics">
91cdf0e10cSrcweir         <paragraph xml-lang="en-US" id="par_id3153711" role="paragraph" l10n="U" oldref="8"><link href="text/scalc/01/04070100.xhp" name="Insert - Names - Define">Insert - Names - Define</link></paragraph>
92cdf0e10cSrcweir         <embed href="text/scalc/guide/goalseek.xhp#goalseek"/>
93cdf0e10cSrcweir         <embed href="text/scalc/guide/relativ_absolut_ref.xhp#relativ_absolut_ref"/>
94cdf0e10cSrcweir         <embed href="text/scalc/guide/address_auto.xhp#address_auto"/><comment>mw deleted one EMBED paragraph and copied two EMBED paragraphs from Calc guide address_byname.xhp</comment>
95cdf0e10cSrcweir</section>
96cdf0e10cSrcweir   </body>
97cdf0e10cSrcweir</helpdocument>