11.08.2013 Views

Excel's Formula - sisman

Excel's Formula - sisman

Excel's Formula - sisman

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

General;-General;<br />

Appendix B: Using Custom Number Formats 745<br />

This format string uses the General format for positive and negative values. You can, of course,<br />

substitute any other format codes for the positive and negative parts of the format string.<br />

Displaying leading zeros<br />

To display leading zeros, create a custom number format that uses the 0 character. For example,<br />

if you want all numbers to display with ten digits, use the number format string that follows.<br />

Values with fewer than ten digits will display with leading zeros.<br />

0000000000<br />

You also can force all numbers to display with a fixed number of leading zeros. The format string<br />

that follows, for example, prepends three zeros to each number:<br />

“000”#<br />

In the following example, the format string uses the repeat character code (an asterisk) to apply<br />

enough leading zeros to fill the entire width of the cell:<br />

*00<br />

Displaying fractions<br />

Excel supports quite a few built-in fraction number formats. (Select the Fraction category from<br />

the Number tab of the Format Cells dialog box.) For example, to display the value .125 as a fraction<br />

with 8 as the denominator, select As Eighths (4/8) from the Type list.<br />

You can use a custom format string to create other fractional formats. For example, the following<br />

format string displays a value in 50ths:<br />

# ??/50<br />

To display the fraction reduced to its lowest terms, use a question mark after the slash symbol.<br />

For example, the value 0.125 can be expressed as 2/16, and 2/16 can be reduced to 1/8. Here’s an<br />

example of a number format that displays the value as a fraction reduced to its simplest terms:<br />

# ?/?

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!