Convert numbers stored as text to numbers

Important notice for users of Office 2003    To continue receiving security updates for Office, make sure you're running Office 2003 Service Pack 3 (SP3). The support for Office 2003 ends April 8, 2014. If you’re running Office 2003 after support ends, to receive all important security updates for Office, you need to upgrade to a later version such as Office 365 or Office 2013. For more information, see Support is ending for Office 2003.

Occasionally, numbers may be formatted and stored in cells as text, which later can cause problems with calculations or produce confusing sort orders. For example, you may have typed a number in a cell that was formatted as text, or the data may have been imported or copied as text from an external data source.

Numbers that are formatted as text are left-aligned instead of right-aligned in the cell. With error checking turned on, they are also marked with an error indicator Cell with formula problem. You can convert them to numbers in one cell or range (range: Two or more cells on a sheet. The cells in a range can be adjacent or nonadjacent.) of cells at a time, or in multiple nonadjacent cells or ranges of cells all at once.

What do you want to do?

Convert numbers in one cell or range of adjacent cells

Convert numbers in multiple nonadjacent cells or ranges of cells

Convert numbers in one cell or range of adjacent cells

  1. On the Tools menu, click Options.
  2. On the Error Checking tab, make sure that the Enable background error checking check box and the Number stored as text check box are both selected, and then click OK.
  3. On the worksheet, select any single cell or range of adjacent cells that has an error indicator in the upper-left corner Cell with formula problem.

 Note   All cells in the selection must be adjacent.

ShowHow to select adjacent cells or ranges

To select Do this
A single cell Click the cell, or press the arrow keys to move to the cell.
A range of cells

Click the first cell of the range, and then drag to the last cell, or hold down SHIFT while you press the arrow keys to extend the selection.

You can also select the first cell in the range and then press F8 to extend the selection by using the arrow keys.

A large range of cells Click the first cell in the range, and then hold down SHIFT while you click the last cell in the range. You can scroll to make the last cell visible.
All cells on a worksheet

Click the Select All button.

Select All button

To select the entire worksheet, you can also press CTRL+A.

 Note   If the worksheet contains data, CTRL+A selects the current region. Pressing CTRL+A a second time selects the entire worksheet.

An entire row or column

Click the row or column heading.

Worksheet showing row heading and column heading

Callout 1 Row heading
Callout 2 Column heading

You can also select cells in a row or column by selecting the first cell and then pressing CTRL+SHIFT+ARROW KEY (RIGHT ARROW or LEFT ARROW for rows, UP ARROW or DOWN ARROW for columns).

 Note   If the row or column contains data, CTRL+SHIFT+ARROW KEY selects the row or column to the last used cell. Pressing CTRL+SHIFT+ARROW KEY a second time selects the entire row or column.

Adjacent rows or columns Drag across the row or column headings. Or select the first row or column; then hold down SHIFT while you select the last row or column.
More or fewer cells than the active selection Hold down SHIFT while you click the last cell that you want to include in the new selection. The rectangular range between the active cell (active cell: The selected cell in which data is entered when you begin typing. Only one cell is active at a time. The active cell is bounded by a heavy border.) and the cell that you click becomes the new selection.

 Note   To cancel a selection of cells, click any cell on the worksheet.

  1. Next to the selected cell or range of cells, click the error button that appears Button image, and then click Convert to Number.

Top of Page Top of Page

Convert numbers in multiple nonadjacent cells or ranges of cells

  1. Select a blank cell that you know has the General number format.

Tip    To verify the cell format, click Cells on the Format menu. On the Number tab, make sure that General is selected in the Category box.

  1. In the cell, type 1, and then press ENTER.
  2. Select the cell, and then click Copy on the Edit menu.
  3. Select the nonadjacent cells or ranges of cells that contain the numbers stored as text that you want to convert.

ShowHow to select nonadjacent cells or ranges

To select Do this
A single cell Click the cell, or press the arrow keys to move to the cell.
A range of cells

Click the first cell of the range, and then drag to the last cell, or hold down SHIFT while you press the arrow keys to extend the selection.

You can also select the first cell in the range and then press F8 to extend the selection by using the arrow keys.

A large range of cells Click the first cell in the range, and then hold down SHIFT while you click the last cell in the range. You can scroll to make the last cell visible.
Nonadjacent cells or cell ranges

Select the first cell or range of cells, and then hold down CTRL while you select the other cells or ranges.

You can also select the first cell or range of cells and then press SHIFT+F8 to add another nonadjacent cell or range to the selection.

 Note   You cannot cancel the selection of a cell or range of cells in a nonadjacent selection without canceling the entire selection.

An entire row or column

Click the row or column heading.

Worksheet showing row heading and column heading

Callout 1 Row heading
Callout 2 Column heading

You can also select cells in a row or column by selecting the first cell and then pressing CTRL+SHIFT+ARROW KEY (RIGHT ARROW or LEFT ARROW for rows, UP ARROW or DOWN ARROW for columns).

 Note   If the row or column contains data, CTRL+SHIFT+ARROW KEY selects the row or column to the last used cell. Pressing CTRL+SHIFT+ARROW KEY a second time selects the entire row or column.

Nonadjacent rows or columns Click the column or row heading of the first row or column in your selection; then hold down CTRL while you click the column or row headings of other rows or columns that you want to add to the selection.
More or fewer cells than the active selection Hold down SHIFT while you click the last cell that you want to include in the new selection. The rectangular range between the active cell (active cell: The selected cell in which data is entered when you begin typing. Only one cell is active at a time. The active cell is bounded by a heavy border.) and the cell that you click becomes the new selection.

 Note   To cancel a selection of cells, click any cell on the worksheet.

  1. On the Edit menu, click Paste Special.
  2. Under Operation, click Multiply.
  3. Click OK.

Tip    If all the numbers are converted successfully, you can delete the content of the cell that you typed in Step 2.

 Note   Some accounting programs display negative values with the negative sign (–) to the right of the value. To convert the text strings to values, you must return all of the characters of the text string except the rightmost character (the negation sign), and then multiply the result by –1. For example, if the value in cell A2 is "156–" the following formula converts the text to the value –156.

Data Formula
156- =LEFT(A2,LEN(A2)-1)*-1

Top of Page Top of Page

 
 
Applies to:
Excel 2003