Contents

# 命名儲存格

## 允許的名稱

Names in Calc can contain letters, numeric characters, and the underline character. Names must start with a letter or an underline character.

允許的特殊字元：

- 底線 (_)

名稱不得與儲存格參照相同。例如，名稱 A1 無效，因為 A1 是左上方儲存格的儲存格參照。

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.

Names for cell ranges must not include blanks. Blanks are allowed within names for sheets and documents.

## Naming cells and ranges

一個能使公式中儲存格和儲存格範圍的參照明確化的好方法是為這些範圍命名。例如，您可將範圍 A1:B2 命名為 Start。接著撰寫公式，如 =SUM(Start)。即使在插入或刪除列或欄之後，LibreOfficeDev 還是能正確地指定依名稱識別的範圍。範圍名稱不得包含空格。

例如，若要讓計算營業稅的公式比較容易讀取，您可以撰寫公式為「=Amount * Tax_rate」而不是「= A5 * B12」。在此情況下，儲存格 A5 會命名為 Amount，而儲存格 B12 會命名為 Tax_rate。

使用[定義名稱] 對話方塊，可定義常用公式或公式各部分的名稱。若要指定範圍名稱，

1. Select a cell or range of cells, then choose Sheet - Named Ranges and Expressions - Define. The Define Names dialog appears.

2. 在 [名稱] 欄位中鍵入所選區塊的名稱。按一下 [新增]。新定義的名稱顯示在下方的清單中。按一下[確定]以關閉對話方塊。

您亦可在此對話方塊中的欄位輸入名稱，再選取對應的儲存格來命名其他儲存格範圍。

如果在公式中鍵入此名稱，輸入前幾個字元後，系統會自動向您提示整個名稱。

- 若要套用要點說明中的名稱，則請按下 Enter 鍵。

- If more than one name starts with the same characters, you can scroll forward through all the names using the CommandCtrl + Tab keys and backward using the Shift + CommandCtrl + Tab keys.

## Naming Formulas

You can assign a simpler or more familiar name to a long or complex formula expression.

1. Choose Sheet - Named Ranges and Expressions - Define. The Define Names dialog appears.

2. Enter the name for the formula expression in the Name field.

3. Enter the formula expression in the Range or formula expression box. For example, if you have named your formula HYP, you can enter the expression SQRT(A1*A1 + B1*B1) to compute the distance between two points on a plane. Do not precede the expression with an equal sign (=).

4. Click Add. The newly defined name appears in the list below. Click OK to close the dialog.

5. Enter the name of the named formula in the desired cell. The cell value is the result of the formula expression. For example, enter =HYP() to compute the formula above. Note that you cannot directly pass parameters to named formulas.

Naming conventions apply to named formulas. Absolute and relative references are respected. For example, when the named formula is copied and pasted.

相關主題

Sheet - Named Ranges and Expressions - Define

使用目標搜尋

位址和參照, 絕對和相對

辨識作為編排位址的名稱

Please support us!