A formula text box is displayed when editing or creating formulas at run time. The formula text box displays built-in formulas, table names, column names in tables, and custom names.
You can use the formula text box to change the cell or cell ranges referenced by the formula. You can also use the formula text box to add formulas from another sheet.
A border is displayed when using the mouse to select a cell range for a formula. Place the pointer at any of the four corners of the formula text box and the pointer changes to a double arrow. Click and drag to expand the selected cell range. For example, type "=SUM(C1" in a cell and then use the mouse to select a cell range.
A different border color is used for a second cell or range.
The structured reference range for a table or a custom name range is highlighted after typing the text in the formula text box.
A list of formula names is displayed when typing a name. Press the Tab key to select the highlighted name.
You can also use the formula text box to select a different cell or cell range. Place the pointer on the border of the formula text box and use the cross shape pointer to click and drag the formula text box to a new location.
公式输入框可以用来在运行时输入或查看公式。
公式输入框可以显示内建的公式,表名,表格中的列名和自定义名称。
你可以使用公式编辑器来修改公式中引用的单元格区域。
你也可以使用公式编辑器来从其他表格中添加公式。
在公公式编辑器中选择单元格区域时,区域边框的颜色将会变化。
将鼠标移动到选择区域的边角处,鼠标的图标将会变为双箭头的样子。按下并拖动该端点可以直接改变选择区域的大小。
当在同一个公式选择了不同的单元格区域时,不同单元格区域的边框样式是不一样的。
在公式中对表格的结构化引用将会被高亮。
输入公式时,将会显示一个下拉框自动提示。
使用 Tab 键来选择高亮的项目。
你也可以使用公式编辑器选择不同的单元格或者单元格区域。
将鼠标指针移动到单元格区域的边缘,按下并拖动,即可改变单元格区域的位置。
使用以下步骤来在 Sheet1 中引用 Sheet2
Use the following instructions to add a formula on Sheet1 that references Sheet2:
- Add the formula on Sheet1.在 Sheet1 中输入一个公式
- Select the 选择 Sheet2 tab.Select the cell or range.标签
- 选择一个区域
- Type any additional formula characters.
- Press Enter.
You can use the following shortcut keys to change the cell or cell range selection while entering formulas.
...
Shortcut Key
...
- 完成公式的编写
- 编写完成后,按下键盘上的 “Enter” 键。
在编辑公式时,你可以使用以下快捷键来改变选中的单元格区域
快捷键 | 动作 |
Shift+Left | SelectionLeft |
Shift+Right | SelectionRight |
Shift+Up | SelectionUp |
Shift+Down | SelectionDown |
Shift+Home | SelectionHome |
Ctrl+Shift+Left | SelectionHome |
Shift+End | SelectionEnd |
Ctrl+Shift+Right | SelectionEnd |
Shift+PageUp | SelectionPageUp |
Shift+PageDown | SelectionPageDown |
Ctrl+Shift+Up | SelectionTop |
Ctrl+Shift+Down | SelectionBottom |
Ctrl+Shift+Home | SelectionFirst |
Ctrl+Shift+End | SelectionLast |
Ctrl + Down | NavigationBottom |
Down | NavigationDown |
End | NavigationEnd |
Ctrl+Right | NavigationEnd |
Ctrl+Home | NavigationFirst |
Home | NavigationHome |
Ctrl+Left | NavigationHome |
Ctrl+End | NavigationLast |
Left | NavigationLeft |
PageDown | NavigationPageDown |
Ctrl+PageUp | NavigationPreviousSheet |
Ctrl+PageDown | NavigationNextSheet |
PageUp | NavigationPageUp |
Right | NavigationRight |
Ctrl+Up | NavigationTop |
Up | NavigationUp |
See Also另见
Allowing Users to Enter Formulas
Creating Custom Names
Creating Tables
Using Structured Reference Formulas
FormulaTextBox class