xref: /trunk/main/helpcontent2/source/text/scalc/guide/cellreferences.xhp (revision 3db955a2a0eef37949ba0352e70640f85aef37cd)
1cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?>
2cdf0e10cSrcweir
302dbb15cSAndrew Rist<!--***********************************************************
4cdf0e10cSrcweir *
502dbb15cSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
602dbb15cSAndrew Rist * or more contributor license agreements.  See the NOTICE file
702dbb15cSAndrew Rist * distributed with this work for additional information
802dbb15cSAndrew Rist * regarding copyright ownership.  The ASF licenses this file
902dbb15cSAndrew Rist * to you under the Apache License, Version 2.0 (the
1002dbb15cSAndrew Rist * "License"); you may not use this file except in compliance
1102dbb15cSAndrew Rist * with the License.  You may obtain a copy of the License at
12cdf0e10cSrcweir *
1302dbb15cSAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
14cdf0e10cSrcweir *
1502dbb15cSAndrew Rist * Unless required by applicable law or agreed to in writing,
1602dbb15cSAndrew Rist * software distributed under the License is distributed on an
1702dbb15cSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1802dbb15cSAndrew Rist * KIND, either express or implied.  See the License for the
1902dbb15cSAndrew Rist * specific language governing permissions and limitations
2002dbb15cSAndrew Rist * under the License.
21cdf0e10cSrcweir *
2202dbb15cSAndrew Rist ***********************************************************-->
2302dbb15cSAndrew Rist
24c5ffc49bSmseidel<helpdocument version="1.0">
25cdf0e10cSrcweir<meta>
26cdf0e10cSrcweir<topic id="textscalcguidecellreferencesxml" indexer="include" status="PUBLISH">
27cdf0e10cSrcweir<title xml-lang="en-US" id="tit">Referencing a Cell in Another Document</title>
28cdf0e10cSrcweir<filename>/text/scalc/guide/cellreferences.xhp</filename>
29cdf0e10cSrcweir</topic>
30cdf0e10cSrcweir</meta>
31cdf0e10cSrcweir<body>
32c5ffc49bSmseidel<bookmark xml-lang="en-US" branch="index" id="bm_id3147436">
33c5ffc49bSmseidel<bookmark_value>sheet references</bookmark_value>
34cdf0e10cSrcweir<bookmark_value>references; to cells in other sheets/documents</bookmark_value>
35cdf0e10cSrcweir<bookmark_value>cells; operating in another document</bookmark_value>
36cdf0e10cSrcweir<bookmark_value>documents;references</bookmark_value>
37cdf0e10cSrcweir</bookmark><comment>mw made "sheet references;" a one level entry</comment><comment>MW changed "references;" and added "documents;"</comment>
38*3db955a2Smseidel<paragraph xml-lang="en-US" id="hd_id3147436" role="heading" level="1" l10n="CHG"><variable id="cellreferences"><link href="text/scalc/guide/cellreferences.xhp" name="Referencing Other Sheets">Referencing Other Sheets</link></variable></paragraph>
39cdf0e10cSrcweir<paragraph xml-lang="en-US" id="par_id9663075" role="paragraph" l10n="NEW">In a sheet cell you can show a reference to a cell in another sheet.</paragraph>
40cdf0e10cSrcweir<paragraph xml-lang="en-US" id="par_id1879329" role="paragraph" l10n="NEW">In the same way, a reference can also be made to a cell from another document provided that this document has already been saved as a file.</paragraph>
41cdf0e10cSrcweir<paragraph xml-lang="en-US" id="hd_id7122409" role="heading" level="2" l10n="NEW">To Reference a Cell in the Same Document</paragraph>
42cdf0e10cSrcweir<list type="ordered">
43cdf0e10cSrcweir<listitem>
44cdf0e10cSrcweir<paragraph xml-lang="en-US" id="par_id2078005" role="listitem" l10n="NEW">Open a new, empty spreadsheet.</paragraph>
45cdf0e10cSrcweir</listitem>
46cdf0e10cSrcweir<listitem>
47cdf0e10cSrcweir<paragraph xml-lang="en-US" id="par_id4943693" role="listitem" l10n="NEW">By way of example, enter the following formula in cell A1 of Sheet1:</paragraph>
48cdf0e10cSrcweir<paragraph xml-lang="en-US" id="par_id9064302" role="listitem" l10n="NEW">
49cdf0e10cSrcweir<item type="literal">=Sheet2.A1</item>
50cdf0e10cSrcweir</paragraph>
51cdf0e10cSrcweir</listitem>
52cdf0e10cSrcweir<listitem>
53cdf0e10cSrcweir<paragraph xml-lang="en-US" id="par_id7609790" role="listitem" l10n="NEW">Click the <emph>Sheet2</emph> tab at the bottom of the spreadsheet. Set the cursor in cell A1 there and enter text or a number.</paragraph>
54cdf0e10cSrcweir</listitem>
55cdf0e10cSrcweir<listitem>
56cdf0e10cSrcweir<paragraph xml-lang="en-US" id="par_id809961" role="listitem" l10n="NEW">If you switch back to Sheet1, you will see the same content in cell A1 there. If the contents of Sheet2.A1 change, then the contents of Sheet1.A1 also change.</paragraph>
57cdf0e10cSrcweir</listitem>
58cdf0e10cSrcweir</list>
59cdf0e10cSrcweir<paragraph xml-lang="en-US" id="hd_id9209570" role="heading" level="2" l10n="NEW">To Reference a Cell in Another Document</paragraph>
60cdf0e10cSrcweir<list type="ordered">
61cdf0e10cSrcweir<listitem>
62cdf0e10cSrcweir<paragraph xml-lang="en-US" id="par_id5949278" role="listitem" l10n="NEW">Choose <emph>File - Open</emph>, to load an existing spreadsheet document.</paragraph>
63cdf0e10cSrcweir</listitem>
64cdf0e10cSrcweir<listitem>
65cdf0e10cSrcweir<paragraph xml-lang="en-US" id="par_id8001953" role="listitem" l10n="NEW">Choose <emph>File - New</emph>, to open a new spreadsheet document. Set the cursor in the cell where you want to insert the external data and enter an equals sign to indicate that you want to begin a formula.</paragraph>
66cdf0e10cSrcweir</listitem>
67cdf0e10cSrcweir<listitem>
68cdf0e10cSrcweir<paragraph xml-lang="en-US" id="par_id8571123" role="listitem" l10n="NEW">Now switch to the document you have just loaded. Click the cell with the data that you want to insert in the new document.</paragraph>
69cdf0e10cSrcweir</listitem>
70cdf0e10cSrcweir<listitem>
71cdf0e10cSrcweir<paragraph xml-lang="en-US" id="par_id8261665" role="listitem" l10n="NEW">Switch back to the new spreadsheet. In the input line you will now see how $[officename] Calc has added the reference to the formula for you.</paragraph>
72cdf0e10cSrcweir<paragraph xml-lang="en-US" id="par_id5888241" role="listitem" l10n="NEW">The reference to a cell of another document contains the name of the other document in single inverted commas, then a hash #, then the name of the sheet of the other document, followed by a point and the name of the cell.</paragraph>
73cdf0e10cSrcweir</listitem>
74cdf0e10cSrcweir<listitem>
75cdf0e10cSrcweir<paragraph xml-lang="en-US" id="par_id7697683" role="listitem" l10n="NEW">Confirm the formula by clicking the green check mark.</paragraph>
76cdf0e10cSrcweir</listitem>
77cdf0e10cSrcweir<listitem>
78cdf0e10cSrcweir<paragraph xml-lang="en-US" id="par_id7099826" role="listitem" l10n="NEW">If you drag the box in the lower right corner of the active cell to select a range of cells, $[officename] automatically inserts the corresponding references in the adjacent cells. As a result, the sheet name is preceded with a "$" sign to designate it as an absolute reference.</paragraph>
79cdf0e10cSrcweir</listitem>
80cdf0e10cSrcweir</list>
81cdf0e10cSrcweir<paragraph xml-lang="en-US" id="par_id674459" role="paragraph" l10n="NEW">If you examine the name of the other document in this formula, you will notice that it is written as a <link href="text/shared/00/00000002.xhp#url" name="URL">URL</link>. This means that you can also enter a URL from the Internet.</paragraph>
82cdf0e10cSrcweir<section id="relatedtopics">
83cdf0e10cSrcweir<embed href="text/scalc/guide/cellreferences_url.xhp#cellreferences_url"/>
84cdf0e10cSrcweir</section>
85cdf0e10cSrcweir</body>
86cdf0e10cSrcweir</helpdocument>
87