Series.FormulaLocal 属性 (Excel)Series.FormulaLocal property (Excel)

使用采用用户语言的 A1 格式引用,返回或设置对象的公式。Returns or sets the formula for the object, using A1-style references in the language of the user. 读/写 StringRead/write String.

语法Syntax

expressionexpression. FormulaLocal

expression:表示 Series 对象的变量。expression A variable that represents a Series object.

备注Remarks

如果单元格包含常量,此属性返回该常量。If the cell contains a constant, this property returns that constant. 如果单元格为空,此属性返回一个空字符串。If the cell is empty, the property returns an empty string. 如果单元格包含公式,此属性将该公式作为字符串返回,所使用的格式与在公式栏中显示的格式相同(包括等号)。If the cell contains a formula, the property returns the formula as a string, in the same format in which it would be displayed in the formula bar (including the equal sign).

如果将单元格的值或公式设为日期类型,Microsoft Excel 将检查该单元格的格式是否符合某个日期或时间数组格式。If you set the value or formula of a cell to a date, Microsoft Excel checks to see whether that cell is already formatted with one of the date or time number formats. 如果不符合,将采用默认的短日期数字格式。If not, the number format is changed to the default short date number format.

如果指定区域是一维或二维区域,则可将公式指定为 Visual Basic 中相同维数的数组。If the range is a one- or two-dimensional range, you can set the formula to a Visual Basic array of the same dimensions. 同样,也可在 Visual Basic 数组中使用公式。Similarly, you can put the formula into a Visual Basic array.

如果对多重单元格区域设置公式,则该区域中的所有单元格都用此公式填充。Setting the formula of a multiple-cell range fills all cells in the range with the formula.

另请参阅See also

Series 对象Series Object