Excel Formatting
Similarly, if you see a currency amount of $1,500.00 displayed in an Excel spreadsheet, this is generally stored in Excel as the number "1500". It is only the formatting of the cells that displays this number with the currency sign ($), the thousands separating comma, and the decimal places. Accessing the Cell Formatting OptionsThere are several ways to access the Excel formatting options for a spreadsheet cell or range of cells. For all methods, click on the cell (or range) and then either:
Excel Data TypesExcel recognises the value of a cell as one of the following types:
Text values will always have the same appearance inside a cell, because Excel recognises them as pure text, with no meaning. Logical values are displayed as TRUE or FALSE Numbers, however, can be displayed in many different ways in an Excel Cell. For example, a value that is stored as a number within Excel may be represented as a date, a percentage, a currency, etc. Although it appears to the user that there are several different types of data in your spreadsheet, it is only the Excel formatting of your number, that makes this single data type appear to have different attributes. The spreadsheet below gives examples of different ways of formatting Excel cells containing numerical values.
Changing Cell FormattingTo change the Excel formatting of a cell's contents, enter the Format Cells control box, (using any of the 3 methods described above), and ensure the first tab, Number is selected. From within the Number tab, select the Excel formatting Category that you want to apply to your cell. For most of the categories, this will cause further options to appear on the right hand side of the control box, which you can then select from. Note that the listed Excel formatting types will only work with numbers, so if you apply a date format to a cell containing text, the appearance of the cell will remain unchanged.
Tip:
Do you have problems identifying whether the contents of a cell are stored as text or as a number by Excel? If you set the horizontal alignment of your cells to "General", Excel aligns numerical values to the right of the cell and text to the left of the cell. This enables you to tell, at a glance, the underlying datatype of a cell's contents. Set the horizontal alignment using the options in the Alignment tab of the Format Cells control box.
Define Your Own Formatting StyleWithin the Number tab of the Format Cells control box, you will notice the last formatting category is Custom. This option has a number of Excel formatting styles that you can select and either use as they are, or edit to produce your own formatting style. To define your own formatting style select the Custom category and then, select one of the types from the menu on the right of the control box. The formatting definition of the selected type then appears in the 'Type' box, which you can then edit. The following sections discuss each of the different Excel formatting options that can be used for displaying numbers: Integer, Decimal & Currency FormattingFormatting a number as an integer or decimal uses the following characters:
Other characters, such as the ",", "$", "£", "+", "-", "(" and ")" can be displayed at the start, middle and/or end of numbers, to make the number more readable, denote currency, or denote positive or negative values, etc. You can even replace the number completely with your chosen characters (eg. replacing a zero value with the text "NIL") You can define one, two or three basic Excel formats for any one cell. If the cell contains a number, these formats are applied depending on whether the number is positive, negative or zero, as follows:
ExamplesThe following examples show the effect of different Excel formatting definitions on the numbers 5198.34, -98.66667 and 0
Formatting PercentagesThe formatting of percentages in Excel uses the "0", "#" and "." characters in the same way as the formatting of integers and decimals. However, when using the percentage format, Excel displays the number multiplied by 100 and followed by the % sign. ExamplesSome examples of the numbers 0.55555, -0.5 and 0, formatted as percentages are shown below:
Date & Time FormattingWhen formatting a cell as a date, time or date and time, use the following characters:
ExamplesThe example below shows different Excel formatting definitions for the date and time '06:00AM on 25th August 2008':
Other Types of Excel FormattingThe Format Cells control box, contains a number of other cell formatting options, allowing you to define the alignment of cell contents, the size, style & colour of text, the cell borders and the colour and pattern of the cell background. These formatting options are self-explanatory and are best learned by experimentation. Some Excel formatting options of particular use are described below: Wrap Text
This option is controlled by a tick-box in the Alignment tab of the Format Cells control box. When ticked, this option forces the contents of the selected cells to 'wrap around', instead of being hidden or writing over adjacent cells. This is shown in the example spreadsheet below:
Tip:
If you want to force a line break at a specific point in a cell, go into the cell (ie. double click on the cell or select the cell and then click on the formula bar), place your curser at the point where you want a line break and press <ALT>-ENTER (ie. press the ALT key and while holding this down, press the Enter/Return key) Merge Cells
The Merge Cells option is also controlled by a tick-box in the Alignment tab of the Format Cells control box. When ticked, this option forces the selected cells to merge together and be treated as one larger cell. This is shown in the example spreadsheet on the left. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright © 2008-2010 ExcelFunctions.net |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||