To work around this behavior, use any of the following methods to reenter
the numbers in the reformatted cells.
Method 1: Retype the Numbers
After you change the format, retype the numbers.
Method 2: Select Edit Directly In Cell
On the Tools menu, click Options or Preferences, click the Edit tab, and
verify that the Edit Directly In Cell check box is selected. Double-click
the cell you want to format, and press ENTER.
Method 3: Use a Microsoft Visual Basic for Applications Procedure
Microsoft 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. Type the following code in a module
sheet:
Sub Enter_Values()
For Each xCell In Selection
xCell.Value = xCell.Value
Next xCell
End Sub
Before you run this procedure, switch to the worksheet that contains the
numbers you want to reentered; select the range of cells that contain
those numbers, and then run the macro.
Method 4: Use Paste Special
To use this method, follow these steps:
- Type the value 1 in a blank cell on the worksheet.
- Select the cell that contains the value 1 and click Copy on the Edit
menu.
- Select the range that contains the numbers that are formatted as text.
Click Paste Special on the Edit menu. Under Operation, click Multiply
and click OK.