0% found this document useful (0 votes)
127 views

Custom Format Codes Reference

1. Custom formats in Excel allow you to change how values are displayed in cells without altering the underlying values. 2. Formats can include up to 4 sections to control how positive numbers, negative numbers, zeros, and text are displayed. 3. The location of periods in the format code determines the number of decimal places displayed.

Uploaded by

Elaine Antonio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
127 views

Custom Format Codes Reference

1. Custom formats in Excel allow you to change how values are displayed in cells without altering the underlying values. 2. Formats can include up to 4 sections to control how positive numbers, negative numbers, zeros, and text are displayed. 3. The location of periods in the format code determines the number of decimal places displayed.

Uploaded by

Elaine Antonio
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

CUSTOM FORMAT CODES IN EXCEL

The default format in Excel is General. General format are displayed just
the way you type them. However, if the cell is not wide enough to show
the entire number, the General format rounds the numbers with
decimals.
Some characters appear normally in a number format, while others
require special handling. The following characters can be be used without
any special handling(use of escape character \):
FORMAT CODE SECTIONS
EXCEL FORMATTING RULES:
1. A custom Excel number format changes only the visual representation, i.e. how
a value is displayed in a cell. The underlying value stored in a cell is not changed.
2. When you are customizing a built-in Excel format, a copy of that format is
created. The original number format cannot be changed or deleted.
3. Excel custom number format does not have to include all four sections.
If a custom format contains just 1 section, that format will be applied to all
number types - positive, negative and zeros.
4. If a custom number format includes 2 sections, the first section is used for
positive numbers and zeros, and the second section - for negative numbers.
5. A custom format is applied to text values only if it contains all four sections.
6. To apply the default Excel number format for any of the middle sections, type
General instead of the corresponding format code.
For example, to display zeros as dashes and show all other values with the default
formatting, use this format code: General; -General; "-"; General
Note. The General format included in the 2nd section of the format code does not
display the minus sign, therefore we include it in the format code.

7. To hide a certain value type(s), skip the corresponding code section, and only
type the ending semicolon.
For example, to hide zeros and negative values, use the following format code:
General; ; ; General. As the result, zeros and negative value will appear only in the
formula bar, but will not be visible in cells.

How to control the number of decimal places, etc.


The location of the decimal point in the number format code is represented by a period(.). The
required number of decimal places is defined by zero(0).
example
0 or # Display the nearest integer with no decimal places
0.0 or #.0 Display 1 decimal place
0.00 0r #.00 Display 2 decimal places
#.00 If you type 0.25 it will display .25
0.00 If you type 0.25, it will display 0.25
#,### Display a thousands separator and no decimal place
#,##0.00 Display a thousands separator and no decimal place and 2
decimal places
#.00,\K To display thousands
#.00,,\M To display millions

#.00 “ Increase”; Add the word “Increase” for positive number;


-#.00”Decrease”;0 Add the word “Decrease” for negative number

MORE EXAMPLES 0F NUMBER FORMATS:


DATES IN EXCEL
All dates are stored as integers representing the number of days since January 1,
1900, which is stored as number 1, to December 31, 9999 stored as 2958465.

In this system:

• 2 is 2-Jan-1900
• 3 is 3-Jan-1900
• 42005 is 1-Jan-2015 (because it is 42,005 days after January 1, 1900)

TIME IN EXCEL
Times are stored in Excel as decimals, between .0 and .99999, that represent a
proportion of the day where .0 is 00:00:00 and .99999 is 23:59:59.

For example:

0.25 is 06:00 AM
0.5 is 12:00 PM
0.541655093 is 12:59:59 PM

DATES & TIMES IN EXCEL


Excel stores dates and times as decimal numbers comprised of an integer
representing the date and a decimal portion representing the time.

For example:

1.25 is January 1, 1900 6:00 AM


42005.5 is January 1, 2015 12:00 PM

You might also like