Techniques for Entering Data

Excel accepts two types of cell entries: constants and formulas. Constants fall into three main categories: numeric values, text values (also called labels or strings), and date/time values. Excel also recognizes two special types of constants, called logical values and error values.

Note

For more about date/time values, see Chapter 15.

In “classic” versions of Excel, all entries and edits happened only in the formula bar; later, in-cell editing was added, and subtle behavioral differences still remain between these modes of entry.

To make an entry in a cell, just select the cell, and start typing. As you type, the entry appears both in the formula bar and in the active cell. The flashing vertical bar in the active cell is called the insertion point.

After you finish typing, you must press Enter to “lock in” the entry to store it permanently in the cell. Pressing Enter normally causes the active cell to move down one row. You can change this so that when you press Enter, either the active cell doesn’t change or it moves to an adjacent cell in another direction. Click the File tab, click Options, select the Advanced category, and either clear the After Pressing Enter, Move Selection check box or change the selection in the Direction drop-down list. You also lock in an entry when you move the selection to a different cell by pressing Tab, Shift+Tab, Shift+Enter, or an arrow key, among other methods, after you type the entry, as shown in Table 6-3.

When you begin typing an entry, three buttons appear on the formula bar: Cancel, Enter, and Insert Function. When you type a formula in which the entry begins with an equal sign (=), a plus sign (+), or a minus sign (–), a drop-down list of frequently used functions becomes available, as shown in Figure 6-7.

A number of characters have special effects in Excel. Here are some guidelines for using special characters:

Note

For more about the built-in Excel Number formats, see Formatting in Depth on page 321. For more information about date and time formats, see “How AutoFill Handles Dates and Times” on page 233.

Although you can type 32,767 characters in a cell, a numeric cell entry can maintain precision to a maximum of only 15 digits. This means you can type numbers longer than 15 digits in a cell, but Excel converts any digits after the 15th to zeros. If you are working with figures greater than 999 trillion or decimals smaller than trillionths, perhaps you need to look into alternative solutions, such as a Cray supercomputer!

If you type a number that is too long to appear in a cell, Excel converts it to scientific notation in the cell if you haven’t applied any other formatting. Excel adjusts the precision of the scientific notation depending on the cell width. If you type a very large or very small number that is longer than the formula bar, Excel displays it in the formula bar using scientific notation. In Figure 6-8, we typed the same number in cell A1 and cell B1; because cell B1 is wider, Excel displays more of the number but still displays it using scientific notation.

The values that appear in formatted cells are called displayed values; the values that are stored in cells and appear in the formula bar are called underlying values. The number of digits that appear in a cell—its displayed value—depends on the width of the column and any formatting you apply to the cell. If you reduce the width of a column that contains a long entry, Excel might display a rounded version of the number, a string of number signs (#), or scientific notation, depending on the display format you’re using.

Sometimes you might want to type special characters that Excel does not normally treat as plain text. For example, you might want +1 to appear in a cell. If you type +1, Excel interprets this as a numeric entry and drops the plus sign (as stated earlier). In addition, Excel normally ignores leading zeros in numbers, such as 01234. You can force Excel to accept special characters as text by using numeric text entries.

To enter a combination of text and numbers, such as G234, just type it. Because this entry includes a nonnumeric character, Excel interprets it as a text value. To create a text entry that consists entirely of numbers, you can precede the entry with a text-alignment prefix character, such as an apostrophe. You can also enter it as a formula by typing an equal sign and enclosing the entry with quotation marks. For example, to enter the number 01234 as text so the leading zero is displayed, type either ‘01234 or =“01234” in a cell. Whereas numeric entries are normally right-aligned, a numeric text entry is left-aligned in the cell, just like regular text, as shown in Figure 6-10.

Text-alignment prefix characters, like formula components, appear in the formula bar but not in the cell. Table 6-5 lists all the text-alignment prefix characters.

Only the apostrophe text-alignment prefix character always works with numeric or text entries. The caret, backslash, and quotation mark characters work only if Transition Navigation Keys are turned on. To do so, click the File tab, click Options, select the Advanced category, and then scroll down to the Lotus Compatibility area and select the Transition Navigation Keys check box.

When you create a numeric entry that starts with an alignment prefix character, a small flag appears in the upper-left corner of the cell, indicating that the cell has a problem you might need to address. When you select the cell, an error button appears to the right. Clicking this button displays a menu of specific commands (refer to Figure 6-10). Because the apostrophe was intentional, you can click Ignore Error.

Note

If a range of cells shares the same problem, as in column A in Figure 6-10, you can select the entire cell range and use the action menu to resolve the problem in all the cells at the same time. For more information, see Using Custom AutoCorrect Actions on page 248.

To make a number of entries in a range of adjacent cells, first select all of them. Then just begin typing entries, as shown in Figure 6-12. Each time you press Enter, the active cell moves to the next cell in the range, and the range remains selected. When you reach the edge of the range and press Enter, the active cell jumps to the beginning of the next column or row. You can continue making entries this way until you fill the entire range.

You can correct simple errors as you type by pressing Backspace. However, to make changes to entries you have already locked in, you first need to enter Edit mode. (The mode indicator at the lower-left corner of the status bar has to change from Ready to Edit.) To enter Edit mode, do one of the following:

To select contiguous characters within a cell, place the insertion point just before or just after the characters you want to replace, and press Shift+Left Arrow or Shift+Right Arrow to extend your selection.

If you need to erase the entire contents of the active cell, press Delete, or press Backspace and then Enter. If you press Backspace accidentally, click the Cancel button or press Esc to restore the contents of the cell before pressing Enter. You can also erase the entire contents of a cell by selecting the cell and typing new contents to replace the old. To revert to the original entry, press Esc before you press Enter.

image with no caption
image with no caption

You can always click the Undo button in the Quick Access Toolbar; alternatively, press Ctrl+Z. The Undo button remembers the last 16 actions you performed. If you press Ctrl+Z repeatedly, each of the last 16 actions is undone, one after the other, in reverse order. You can also click the small arrow next to the Undo button to display a list of remembered actions. Drag the mouse to select one or more actions, as shown in Figure 6-13. After you release the mouse, all the selected actions are undone. The Redo button works the same way; you can quickly redo what you have just undone, if necessary.