Manage Named Ranges and Formulas in LibreOffice Calc
Managing named cell ranges and referencing formulas across workbooks in LibreOffice Calc improves spreadsheet organization, simplifies complex calculations, and enhances collaborative data tracking. This guide covers how to define and modify named ranges within a sheet, implement them in formulas, link external workbooks using absolute file paths and named references, and manage external data links efficiently.
Creating and Defining Named Ranges
Named ranges allow you to assign a meaningful label to a single cell
or a block of cells instead of using standard coordinate references like
A1:B10.
- Select the Range: Highlight the cell or group of cells you want to name.
- Open the Define Names Dialog: Navigate to Sheet > Named Ranges and Expressions > Define… (or press Ctrl + F3).
- Set the Name and Scope:
- Enter a descriptive name in the Name field (names cannot contain spaces or special characters except underscores).
- Define the Scope. Select Document (Global) to use the name across the entire workbook, or select a specific sheet to restrict its availability.
- Save: Click Add and then OK.
Alternatively, select the cell range, click directly into the Name Box (located to the left of the Formula Bar), type your desired name, and press Enter.
Editing and Managing Existing Names
To review, edit, or delete existing named ranges:
- Go to Sheet > Named Ranges and Expressions > Manage… (or press Ctrl + F3).
- Select the name you wish to modify.
- Update the cell range in the Range or formula expression box, or click Delete to remove it.
- Click OK to apply the changes.
Using Named Ranges in Formulas
Once defined, named ranges replace standard coordinates inside formulas to make them easier to read:
Direct Formula Entry: Type the assigned name directly into your calculation. For example:
=SUM(Quarterly_Revenue)Autocomplete: Calc provides an autocomplete suggestion list as you begin typing the name of a defined range.
Insert via Dialog: While writing a formula, press F3 to open the Paste Names dialog, select the required range, and insert it into the formula.
Referencing Cells and Named Ranges Across Workbooks
To calculate values using data stored in a separate, external LibreOffice Calc file, you must use the standard file URI syntax.
1. Referencing a Standard Cell Range in Another Workbook
The general syntax to pull data from an external file is:
='file:///Path/To/ExternalWorkbook.ods'#$Sheet1.A1
Windows Example:
='file:///C:/Users/Username/Documents/Sales.ods'#$Sheet1.B5Linux/macOS Example:
='file:///home/user/documents/Sales.ods'#$Sheet1.B5
2. Referencing an External Named Range
If the external workbook contains a defined named range with a global document scope, reference it directly after the file path:
=SUM('file:///C:/Users/Username/Documents/Sales.ods'#Quarterly_Revenue)
Managing and Updating External Links
When workbooks depend on external references, links must be maintained to ensure data accuracy.
- Go to Edit > Links to External Files…
- In the dialog, you will see a list of all external files linked to the current document.
- Select an external file link to perform any of the following
actions:
- Update: Refreshes data immediately from the source file.
- Modify: Updates the source file path if the external file has been moved or renamed.
- Break Link: Removes the external connection and converts current external values into static data.
- Set the Update preference to either Automatic or Manual according to your workflow requirements.