Skip to main content

Name Box

  • 3 minutes to read

A Name Box is a part of the formula bar (SpreadsheetFormulaBar) that displays a reference to the currently active cell. If a cell range selected in a worksheet has a name, the name box displays the range name, as well as a table, picture or chart name when the corresponding object is selected. The name box also allows end-users to create workbook level defined names for cells, and quickly navigate to cells by their references and names.

To display or hide the name box in your application, use the SpreadsheetFormulaBar.ShowNameBox property. This property is true by default.

Below is the list of capabilities provided by the name box.

  • Obtain an active cell reference

    The name box displays a reference of the current active cell.

    SpreadsheetControl_NameBox_ActiveCellReference

  • Select cells by references

    Name box allows you to select cells in a worksheet by their references, without using the mouse or keyboard shortcuts.

    Operation

    How to implement the operation

    Select a cell range in the active worksheet

    Type the cell range reference in the name box and press the Enter key.

    SpreadsheetControl_NameBox_SelectCellRange

    Select a cell range in any worksheet in the current workbook

    In the name box, type the worksheet name before the cell reference, separating them with an exclamation point (!), and press the Enter key.

    SpreadsheetControl_NameBox_SelectCellRange1

    Select multiple ranges simultaneously

    In the name box, type cell range references, separating them with commas, and press the Enter key.

    SpreadsheetControl_NameBox_SelectMultipleRanges

  • Control the number of rows and columns while selecting a cell range with the mouse

    The name box displays the number of rows and columns currently selected while an end-user is selecting cells and the left mouse button is being pressed.

    SpreadsheetControl_NameBox_SelectedRangeSize

  • Create workbook level names for cells

    One of the ways to create a name for a cell range is to use the name box, following the steps below.

    • Select a cell range to be named.
    • Click the name box (by default, it shows the reference of the active cell).
    • Type the desired name (the Defined Names document lists the syntax rules for names). Note that a name cannot be entered into the name box while cell content is being edited.
    • Press the Enter key.

    SpreadsheetControl_NameBox_CreateName

    Note

    To create defined names more flexibly (for example, specify a formula or constant to be associated with the defined name, or set an individual worksheet to be the scope of the name, or accompany the name with a comment), the New Name dialog can be used. Defined names for cell ranges can also be automatically generated from values in the selected cells via the Create Names from Selection dialog.

  • Select cells by names

    Name box allows you to select cells in a worksheet by their names. In the name box, type or select from the drop-down list an existing cell range name, and press the Enter key.

    SpreadsheetControl_NameBox_NavigateToNamedCells

    Note

    To insert a defined name to a formula, an end-user can select it from the Use in Formula list on the Formulas Ribbon tab in the Defined Names group.

  • Obtain the selected table, picture or chart name

    The name box displays the name of the table, picture or chart currently selected in the SpreadsheetControl.

    SpreadsheetControl_NameBox_PictureName

See Also