<?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/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 -->


<meta>
      <topic id="textscalcguidevalue_with_namexml" indexer="include" status="PUBLISH">
         <title xml-lang="en-US" id="tit">Naming Cells</title>
         <filename>/text/scalc/guide/value_with_name.xhp</filename>
      </topic>
   </meta>
   <body>
<bookmark xml-lang="en-US" branch="index" id="bm_id3147434"><bookmark_value>cells; defining names</bookmark_value>
      <bookmark_value>names; defining for cells</bookmark_value>
      <bookmark_value>values; defining names</bookmark_value>
      <bookmark_value>constants definition</bookmark_value>
      <bookmark_value>variables; defining names</bookmark_value>
      <bookmark_value>cell ranges; defining names</bookmark_value>
      <bookmark_value>defining;names for cell ranges</bookmark_value>
      <bookmark_value>formulas; defining names</bookmark_value>
      <bookmark_value>addressing; by defined names</bookmark_value>
      <bookmark_value>cell names; defining/addressing</bookmark_value>
      <bookmark_value>references; by defined names</bookmark_value>
      <bookmark_value>allowed cell names</bookmark_value>
      <bookmark_value>renaming;cells</bookmark_value>
</bookmark><comment>mw changed "names;...", "addressing;..." and "references,..."  entries.</comment><comment>mw added "renaming;"</comment>
<paragraph xml-lang="en-US" id="hd_id3147434" role="heading" level="1"><variable id="value_with_name"><link href="text/scalc/guide/value_with_name.xhp">Naming Cells</link>
</variable></paragraph>
      <h2 id="hd_id4391918">Allowed names</h2>
      <paragraph xml-lang="en-US" id="par_id2129581" role="paragraph">Names in Calc can contain letters, numeric characters, and the underline character. Names must start with a letter or an underline character.</paragraph>
      <paragraph xml-lang="en-US" id="par_id1120029" role="paragraph">Allowed special characters:</paragraph>
      <list type="unordered">
         <listitem>
            <paragraph xml-lang="en-US" id="par_id3362224" role="paragraph">underline (_) </paragraph>
         </listitem>
      </list>
      <paragraph xml-lang="en-US" id="par_id328989" role="paragraph">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>
      <paragraph xml-lang="en-US" id="par_id32898987" role="paragraph">Names must not start with the letters C or R followed by a number; also single characters C and R are not allowed as names. See the ADDRESS function for more information.</paragraph>
      <paragraph xml-lang="en-US" id="par_id4769737" role="paragraph">Names for cell ranges must not include blanks. Blanks are allowed within names for sheets and documents.</paragraph>
      <h2 id="hd_id1226233">Naming cells and formulas</h2>
      <paragraph xml-lang="en-US" id="par_id5489364" role="paragraph">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>
      <paragraph xml-lang="en-US" id="par_id953398" role="paragraph">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>
      <paragraph xml-lang="en-US" id="par_id4889675" role="paragraph">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>
      <list type="ordered">
         <listitem>
            <paragraph xml-lang="en-US" id="par_id3153954" role="listitem">Select a cell or range of cells, then choose <emph>Sheet - Named Ranges and Expressions - Define</emph>. The <emph>Define Names</emph> dialog appears.</paragraph>
         </listitem>
         <listitem>
            <paragraph xml-lang="en-US" id="par_id3156283" role="listitem">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>
         </listitem>
      </list>
      <paragraph xml-lang="en-US" id="par_id5774101" role="paragraph">You can also name other cell ranges in this dialog by entering the name in the field and then selecting the respective cells.</paragraph>
      <paragraph xml-lang="en-US" id="par_id3154942" role="paragraph">If you type the name in a formula, after the first few characters entered you will see the entire name as a tip.</paragraph>
      <list type="unordered">
         <listitem>
            <paragraph xml-lang="en-US" id="par_id3154510" role="listitem">Press the Enter key in order to accept the name from the tip.</paragraph>
         </listitem>
         <listitem>
            <paragraph xml-lang="en-US" id="par_id3150749" role="listitem">If more than one name starts with the same characters, you can scroll forward through all the names using the <switchinline select="sys"><caseinline select="MAC"><keycode>Command</keycode></caseinline><defaultinline><keycode>Ctrl</keycode></defaultinline></switchinline> <keycode>+ Tab keys</keycode> and backward using the <keycode>Shift +</keycode> <switchinline select="sys"><caseinline select="MAC"><keycode>Command</keycode></caseinline><defaultinline><keycode>Ctrl</keycode></defaultinline></switchinline> <keycode>+ Tab</keycode> keys.<comment>mw copied contents from Calc guide address_byname.xhp</comment></paragraph>
         </listitem>
      </list>
      <section id="relatedtopics">
         <paragraph xml-lang="en-US" id="par_id3153711" role="paragraph"><link href="text/scalc/01/04070100.xhp">Sheet - Named Ranges and Expressions - Define</link></paragraph>
         <embed href="text/scalc/guide/goalseek.xhp#goalseek"/>
         <embed href="text/scalc/guide/relativ_absolut_ref.xhp#relativ_absolut_ref"/>
         <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>
</section>
   </body>
</helpdocument>
