# Strings and numbers

There are four basic types of data that can be entered into cells. They are:

Strings

  A string is any set of letters, or of letters and numbers. The only limitations are that strings cannot contain newlines. Put a single quote before strings beginning with a single quote and and an @ sign, +, -, or =. See for an example of entering a string.

Numbers

  Numbers can be formatted as money, ($10.00), dates (11 Nov. 2002), or scientific notation (2.3e12). If you want a number to be displayed as a plain string without any number formatting, you can put a single quote (') before it.

Formulas

  Formulas are ways of describing a calculation you want Gnumeric to make automatically. Formulas always begin with a special character, which is usually the equals sign (=). You may also use the at symbol (@) or the plus or minus symbols (+ or -).

Cell References

  A cell reference is the part of a formula which refers to another cell. For example, in the formula to add two cells =(A4+A1), both A4 and A1 are cell references.

## Entering strings and numbers.

## Dates and Numbers

When you begin entering a number, Gnumeric will attempt to match the data you enter with existing formats for numbered data. If it matches a data format, Gnumeric will automatically convert the entered data into the appropriate serial number, displaying it in an appropriate format.

Because of the format matching ability, user-entered data can be autofilled (see for more information) properly.

See for some examples of the many date and time formats that are accepted by Gnumeric.

## Editing of cells.

### Entering data in a cell

1. Select the cell where you want to enter data by clicking on it with the white cross cursor.

2. Type in the data or formula.

3. Press Enter.

See for more detail on entering formulas into cells.

## Editing commands

After selecting the cell and initially entering the data, the user is in a limited editing mode, designed to aid in entering data which may contain cell references. The main keys for editing mistakes in this mode is the backspace key.

### Advanced Editing mode

For a more complete set of editing options, especially for longer entries, there is an advanced editing mode. To enter the advanced editing mode, press F2. The keyboard focus will then shift from the current cell to the editing region at the top of the worksheet. There, you can use cursor keys to position the cursor within the data in the cell, and have all of the capabilities of the data entry area available.

For example, you can use:

Backspace

  Delete the character to the left of the cursor.

Cursor keys

  Move the cursor appropriately.

Ctrl+K

  Delete to the end of the line

See For more info on the data entry area.

#### TIP

All the normal key bindings for Gnome application entry boxes also apply in the data entry box.

### Error Messages

If a formula or set of data is not acceptable, Gnumeric will display an error message in the cell.

&formulas;

&cellrefer;

# Selecting Cells While Entering Formulas.

When entering a formula into a cell, you can use the mouse and the keyboard cursor keys enter data more quickly.

There are several ways to enter a cell range into a formula. Cell ranges and references can be entered into a formula simply by typing in the proper syntax (see for more details). But manually entering in cell ranges is slow and cumbersome.

When entering data into a cell, and the cursor is at a point where a cell reference is appropriate, it is possible to define a cell reference by selecting a cell via the mouse or keyboard. This selection is a little different from the ordinary selection. It is highlighted by a "marching ants" border.

## The highlighted selection

## Entering data into a formula with the mouse

To make a cell reference using the mouse:

### Using the mouse to enter a cell reference into a formula

1. Begin entering a formula as you would normally. Stop at the point where a cell reference is appropriate. For example, example, type `=exp(`

2. Click on the cell you want to reference. Its reference will be entered into the formula.

3. To finish the formula, just type in the closing parenthesis. This will also "unselect" the region.

This can be used to select a range of cells just like regular selections.

## Entering data into a formula with the keyboard.

If entering lots of formulas or even just entering a few formulas, it is often quickest to use the keyboard to select cells and ranges of cells for use in formulas. Just as reaching a input point allows the user to select cells with the mouse, it is possible to use the keyboard to select cells. Just use the cursor keys and selection modifiers to create a selection.

### Using the keyboard to enter data into a formula.

1. Select a cell to enter a formula into. For example A1.

2. Enter a formula, but stop the cursor at a point where a cell reference is appropriate. For this example, =SUM(

3. Move the selection around with the cursor keys. Move the selection cursor to cell B1 to start the selection.

4. Hold down Shift and move the selection one cell over and one cell down. Cells B1,B2,C1,C2 should now be selected and the formula should show =sum(B1:C2

5. To finish the function, close the parenthesis. The cell should now show =sum(B1:C2). Press enter and the formula is entered.

To select a range of cell, hold Shift and move over the desired area.

To stop entering a selection or to start over, press Shift Backspace

&selections;