Note Office 365 ProPlus is being renamed to Microsoft 365 Apps for enterprise. For more information about this change, read this blog post. Microsoft Excel lets you change many of the ways it displays data in a cell. For example, you can specify the number of digits to the right of a decimal point, or you can add a pattern and border to the cell. You can access and modify the majority of these settings in the Format Cells dialog box (on the Format menu, click Cells). The "More Information" section of this article provides information about each of the settings available in the Format Cells dialog box and how each of these settings can affect the way your data is presented. There are six tabs in the Format Cells dialog box: Number, Alignment, Font, Border, Patterns, and Protection. The following sections describe the settings available in each tab. Number TabAuto Number FormattingBy default, all worksheet cells are formatted with the General number format. With the General format, anything you type into the cell is usually left as-is. For example, if you type 36526 into a cell and then press ENTER, the cell contents are displayed as 36526. This is because the cell remains in the General number format. However, if you first format the cell as a date (for example, d/d/yyyy) and then type the number 36526, the cell displays 1/1/2000. There are also other situations where Excel leaves the number format as General, but the cell contents are not displayed exactly as they were typed. For example, if you have a narrow column and you type a long string of digits like 123456789, the cell might instead display something like 1.2E+08. If you check the number format in this situation, it remains as General. Finally, there are scenarios where Excel may automatically change the number format from General to something else, based on the characters that you typed into the cell. This feature saves you from having to manually make the easily recognized number format changes. The following table outlines a few examples where this can occur:
Generally speaking, Excel applies automatic number formatting whenever you type the following types of data into a cell:
Built-in Number FormatsExcel has a large array of built-in number formats from which you can choose. To use one of these formats, click any one of the categories below General and then select the option that you want for that format. When you select a format from the list, Excel automatically displays an example of the output in the Sample box on the Number tab. For example, if you type 1.23 in the cell and you select Number in the category list, with three decimal places, the number 1.230 is displayed in the cell. These built-in number formats actually use a predefined combination of the symbols listed below in the "Custom Number Formats" section. However, the underlying custom number format is transparent to you. The following table lists all of the available built-in number formats:
Custom Number FormatsIf one of the built-in number formats does not display the data in the format that you require, you can create your own custom number format. You can create these custom number formats by modifying the built-in formats or by combining the formatting symbols into your own combination. Before you create your own custom number format, you need to be aware of a few simple rules governing the syntax for number formats:
To create a custom number format, click Custom in the Category list on the Number tab in the Format Cells dialog box. Then, type your custom number format in the Type box. The following table outlines the different symbols available for use in custom number formats.
Displayed Value versus Stored ValueMicrosoft Excel displays a number according to the format of the cell that contains it. Therefore, the number that you see in the cell may differ from the number stored by Excel and from the number used in calculations that refer to the cell. For example, if you type 1.2345 in a cell where you only want two digits to the right of the decimal to be displayed, the cell displays the value 1.23. Note however, if you use that cell in a calculation, the full four digits to the right of the decimal are used. Alignment TabYou can position text and numbers, change the orientation and specify text control in cells by using the Alignment tab in the Format Cells dialog box. Text AlignmentUnder Text alignment, you control the horizontal, vertical alignment and indention. The following is a list of available settings for text alignment:
Text ControlThere are some additional miscellaneous text alignment controls in the Text Control section of the Alignment tab. These controls are Wrap Text, Shrink to Fit and Merge Cells. Select Wrap Text to wrap the text in the selected cell. The number of wrapped lines depends on the width of the column and the length of the cell contents.
Note To start a new line when the Wrap Text option is selected, press ALT+ENTER while typing in the formula bar. Selecting the Shrink to Fit option decreases the font size of the text in a cell until all the contents of the cell can be displayed. This feature is helpful when you want to avoid changing the column width for the entire column. The applied font size is not changed. The Merge Cells option combines two or more selected cells into a single cell. A "merged cell" is a single cell created by combining two or more selected cells. The cell reference for a merged cell is the upper-left cell in the original selected range. OrientationYou can set the amount of text rotation in the selected cell by using the Orientation section. Use a positive number in the Degree box to rotate the selected text from lower left to upper right in the cell. Use negative degrees to rotate text from upper left to lower right in the selected cell. To display text vertically from top to bottom, click the vertical Text box under Orientation. This gives a stacked appearance to text, numbers and formulas in the cell. Font TabThe term font refers to a typeface (for example, Arial), along with its attributes (point size, font style, underlining, color, and effects). Use the Font tab in the Format Cells dialog box to control these settings. You can see a preview of your settings by reviewing the Preview section of the dialog box.
Note You can use this same Font tab to format individual characters. To do this, select the characters in the formula bar and click Cells on the Format menu. Typeface, Font Style, and SizeThe Font option on the Font tab allows you to choose a typeface. You choose your typeface for the selected cell by clicking a name in the Font list or typing a name in the Font box. There are three types of typefaces you can use, as described in the following table:
After you select a typeface in the Font list, the Size list displays the available point sizes. Keep in mind that each point is 1/72 of an inch. If you type a number in the Size box that is not in the Size list, you see the following text at the bottom of the Font tab: "This font's size is not installed on the system. The closest available font will be used." Typeface StylesThe list of choices in the Font Style list varies depending on the font that is selected in the Font list. Most fonts include the following styles:
UnderlineIn the Underline list, you can select an underlining option to format the selected text. The following table describes each underlining option:
Color, Effects, and Normal Font SettingsChoose a color for the font by clicking a color in the Color list. You can rest the mouse over a color to see a ToolTip with the color name. The Automatic color is always black unless you change the window font color on the Appearance tab of the Display Properties dialog box. (Double-click the Display icon in the Control Panel to open the Display Properties dialog box.) Select the Normal font check box to set the font, font style, size, and effects to the Normal style. This is essentially resetting the cell formatting to defaults. Select the Strikethrough check box to draw a line through selected text or numbers. Select the Superscript check box to format the selected text or numbers as superscripts (above). Select the Subscript check box to format the selected text or numbers as subscripts (below). You typically want to use subscripts and superscripts for individual characters in a cell. To do this, select the characters in the formula bar and click Cells on the Format menu. Border TabIn Excel, you can put a border around a single cell or a range of cells. You can also have a line drawn from the upper-left corner of the cell to the lower-right corner, or from the lower-left corner of the cell to the upper-right corner. You can customize these cells' borders from their default settings by changing the line style, line thickness or line color. The following settings are available on the Border tab of the Format Cells dialog box:
Applying BordersTo add a border to a single cell or a range of cells, follow these steps:
Patterns TabUse the Patterns tab in the Format Cells dialog box to set the background color of the selected cells. You can also use the Pattern list to apply two-color patterns or shading for the background of the cell.
Note The color palette on the Patterns tab is the same color palette from the Color tab of the Options dialog box. Click Options on the Tools menu to access the Options dialog box. To shade cells with patterns, follow these steps:
If you do not select a pattern color, the pattern is black. You can return the background color formatting for the selected cells to their default state by clicking No Color. Protection TabThe Protection tab offers you two options for protecting your worksheet data and formulas: However, neither of these two options takes effect unless you also protect your worksheet. To protect a worksheet, point to Protection on the Tools menu, click Protect Sheet, and then select the Contents check box. LockedBy default, all cells in a worksheet have the Locked option turned on. When this option is turned on (and the worksheet is protected), you cannot do the following:
Note If you want to be able to type data in some cells after protecting the worksheet, make sure to clear the Locked check box for those cells. By default, all cells in a worksheet have the Hidden option turned off. If you turn on this option (and the worksheet is protected) the formula in a cell does not appear in the formula bar. However, you do see the results of the formula in the cell.
Important The Locked and Hidden settings enable specific collaboration scenarios to function correctly in collaboration environments that do not include users who have malicious intent. You cannot enable a strong encryption file by using these settings. To protect the document or the file from a user who has malicious intent, use Information Rights Management (IRM) to set permissions that will protect the document or the file. For more information about the Office features that help enable collaboration, see Description of Office features that are intended to enable collaboration and that are not intended to increase security . ReferencesFor more information about cell formatting, click Microsoft Excel Help on the Help menu, type worksheet formatting in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned. |