Spreadsheets are versatile creatures . Oftentimes your spreadsheet use is limited only by your imagination . Use the following procedures as a mental primer to help expand your understanding of what's possible with Calc. Combining Data From Many Sheets Into One SheetIt's good practice to use multiple sheets to organize spreadsheets (see Break It Up on page 586). The main idea behind this procedure is to build separate pieces of information on different sheets, then include bits of data from each of the separate sheets onto another sheet (which we'll call a master sheet in this procedure). A good example of this is a profit and loss (P&L) report, which combines data from separate income and expense sheets to create a report on a third sheet, as shown in Figure 20-25. The data from the income and expense sheets is pasted into the P&L sheet as links, so that when the data on those sheets changes, the data on the P&L sheet updates automatically.
Figure 20-25. Combining cells in many sheets on a master sheet
As an alternative to using the Paste Special command, you can enter the reference manually using the following syntax: =$SheetName.$A$1 (SheetName is the exact name that appears on the sheet's tab at the bottom of the Calc window.) Use that exact syntax (without the equals sign) when using that cell reference inside formulas. Strictly speaking, this isn't a link by normal standards that is updated like a link (by choosing Edit > Links and clicking Update). It's a reference that is automatically or manually calculated (see Updating Calculations on page 571). Note Notice the use of the $ in the cell references. This signifies an absolute reference. For more information, see Relative and Absolute Cell References on page 568. You can also insert entire sheets from other Calc files into a spreadsheet, by copy or by link. See Adding Sheets to a Spreadsheet on page 521. About the Calc Consolidation FeatureCalc also has a feature called Consolidation (Data > Consolidate) that lets you combine and perform calculations on separate groups of data. The effect of creating links to data is identical to the more manual copy and paste special process in the previous procedure. However, Consolidate isn't an extremely intuitive tool, and you're likely to get more predictable results by using the previous copy/paste special procedure for combining separate pieces of data in one sheet or area and setting up calculations manually. Linking to Data in Other Calc FilesThis procedure is the same in concept to the previous procedure, Combining Data From Many Sheets Into One Sheet, except that you link to cells in other Calc files.
As an alternative to having other spreadsheet files open, you can enter the reference manually using the following syntax: On Linux and Solaris=DDE("soffice";"/home/docs/Filename.sdc";"'SheetName'.A1") On Windows=DDE("soffice";"C:\My Documents\Filename.sdc";"'SheetName'.A1") The Windows example shows a path to a hard drive rather than to a network location. /home/docs and C:\My Documents are the paths to the file. The filename is the exact filename. SheetName is the exact name on the sheet tab containing the data. A1 is the cell being referenced. The SheetName is enclosed in single quotes, and the SheetName and cell reference are enclosed together in double quotes. Use that exact syntax (without the equals sign) when using that cell reference nested within formulas. |