Unexpected behavior in Excel for Mac with numbers formatted as text (191007)
The information in this article applies to:
- Microsoft Excel 2004 for Mac
- Microsoft Excel X for Mac
- Microsoft Excel 2001 for Mac
- Microsoft Excel 98 Macintosh Edition
This article was previously published under Q191007 SYMPTOMS
If a number is formatted with the Text number format, and you attempt to change the format to something other than Text, the number may not be changed as you expect.CAUSE
When you format a cell using the Text number format, the cell is changed and anything that is entered is displayed as text.WORKAROUND
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, or click in the formula bar and then press RETURN.
Method 2: Select Edit Directly In CellTo use this method, follow these steps:
- Click Preferences on the appropriate menu in the following list:
- The Tools menu in Microsoft Excel 98 for Mac.
- The Edit menu in Microsoft Excel 2001 for Mac.
- The Excel menu for Microsoft Excel X for the Mac or a later version.
- Click the Edit tab, and then verify that the Edit directly in cell check box is selected.
- Double-click the cell that you want to format, and then press RETURN.
Method 3: Use a Microsoft 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. 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 reentered, select the range of cells that contain those
numbers, apply a number format other than Text, 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 were formatted as text. Click Paste Special on the Edit menu, click Multiply under Operation, and click OK.
- If you have to, change the cell format of the selection to a number format other than Text.
REFERENCESExcel X and later versionsFor more information about how to format cells as text, click Excel Help on the Help menu, type format existing numbers as text, click Search, and then click a topic to view it. Excel 2001For more information about formatting cells as text, click the Office Assistant, type format existing numbers as text, click Search, and then click a topic to it. Note If the Assistant is hidden, click the Office Assistant button on the standard toolbar. Excel 98
For more information about formatting cells as text, click the Office Assistant, type
format numbers text, click Search, and then click Format existing numbers as text to view the topic. Note If the Assistant is hidden, click the Office Assistant button on the standard toolbar. If Microsoft Help is not installed on your computer, click the following article number to view the article in the Microsoft Knowledge Base:
179216
OFF98: How to Use the Microsoft Office Installer Program
Modification Type: | Major | Last Reviewed: | 6/30/2005 |
---|
Keywords: | kbprb KB191007 |
---|
|