命名单元格

允许的名称

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)」。即使插入或删除一些行或列后,LibreOffice 仍能正确地指定按名称标识的区域。区域名称不能包含任何空格。

例如,如果可以编写「= Amount * Tax_rate」,而不是「= A5 * B12」,则营业税公式要容易辨识得多。在这种情况下,应该将单元格 A5 命名为「Amount」,而将单元格 B12 命名为「Tax_rate」。

请使用「定义名称」对话框为一些常用的公式或公式的某些部分定义名称。要指定区域名称,

  1. 选择某个单元格或单元格区域,然后选择「工作表 - 命名区域与表达式 - 定义」。将显示「定义名称」对话框。

  2. 在「名称字段中为选中的区域输入名称。点击添加」。新定义的名称将显示在下面的列表中。点击「确定」关闭对话框。

还可以在此对话框中命名其他单元格区域,方法是在字段中输入名称,然后选择相应的单元格。

在公式中输入名称时,输入前几个字符后,会自动向您提示整个名称。

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.


请支持我们!

请支持我们!