SpreadJS 14
Features / Formulas / Formula Text Box
In This Topic
    Formula Text Box
    In This Topic

    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.

    Dragging the mouse pointer to expand the selectdc cell range

    A different border color is used for a second cell or range.

    Ranges with different border colors

    Similarly, a different border color is used for the third cell or range and so on.

    In a large formula where multiple cells are used or a cell range (that spans to two or more cells) is selected, the in-cell formula textbox displays colorful text as shown in the below image:

    Formula textbox displaying colorful text

    The structured reference range for a table or a custom name range is highlighted after typing the text in the formula text box.

    Highlighted structured reference range in the formula textbox

    A list of formula names is displayed when typing a name. Press the Tab key to select the highlighted name.

    List showing formula names

    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.

    using mouse pointer to drag the formula text box to a new location

    Use the following instructions to add a formula on Sheet1 that references Sheet2:

    1. Add the formula on Sheet1.

      Adding formula in sheet

    2. Select the Sheet2 tab.
    3. Select the cell or range.

      Selecting cell raange in sheet

    4. Type any additional formula characters.
    5. Press Enter.

      Formula output

    You can use the following shortcut keys to change the cell or cell range selection while entering formulas.

    Shortcut Key Action
    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