- The cell is formatted with the Text format.
- The underlying value in the cell is text.
Method 1: Retyping the Values in the CellsOn the Format menu, click Cells, and click the Number tab to change the number format of the cells. Then, retype the numbers.
Method 2: Select Edit Directly In CellTo use this method, follow these steps:
- On the Tools menu, click Options.
- On the Edit tab, verify that the Edit Directly In Cell check box is selected. Click OK.
- Double-click the cell you want to format, and then press ENTER.
Method 3: Using Paste Special with MultiplyTo use this method, follow these steps:
- In any blank cell, enter the value 1.
- Select the cell in which you typed 1 and click Copy on the Edit menu.
- Select the cells with the values that you want to convert to numbers.
- On the Edit menu, click Paste Special.
- Under Operation, click Multiply. Under Paste, click Values and then click OK.
Method 4: Use a Visual Basic for Applications ProcedureMicrosoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. Create a Visual Basic for Applications macro to reenter the numbers in the selected cell or range of cells. To do this, follow these steps:
- Select the cells that exhibit the behavior.
- If you have not already done so, click Cells on the Format menu and click the Number tab to change the number format of the cells.
- Press ALT+F11 to open the Visual Basic Editor.
- On the Insert menu, click Module.
- Type the following macro code in the new module:
For Each xCell In Selection
xCell.Value = xCell.Value
- Press ALT+F11 to switch to Microsoft Excel.
- Reselect the affected cells if they are not already selected.
- On the Tools menu, point to Macro, and then click Macros. In the Macro Name list, click Enter_Values. Click Run.
- Select a single cell or a range of cells.
- On the Format menu, click Cells.
- Click the Number tab, click Text, and then click OK.
- In the cell or range of cells you selected, type numeric values.
NOTE: If you enter the numbers before you format the cells to use the Text number format, the data you enter remains numeric; however, Microsoft Excel aligns the numbers to the left in the cells so that the numbers appear as text.
Id. de artículo: 181226 - Última revisión: 06/23/2005 - Revisión: 1