Understanding Number Formatting Codes

Written by Allen Wyatt (last updated March 10, 2021)
This tip applies to Excel 97, 2000, 2002, and 2003


1

The most frequently used formatting codes are those that affect straight numbers. Excel provides many of them, as shown here:

Symbol Meaning
General Uses the general display format.
# Indicates a single-digit position. The digit is only displayed if there is a digit in that position.
0 Indicates a single-digit position. If there is no digit in the position, a 0 is displayed.
? Same as the 0 symbol, except results in a space being displayed for insignificant 0s on either side of the decimal point.
. (period) The decimal point.
% Percentage. The number is multiplied by 100 (for the display) and the % sign is added.
, (comma) Thousands separator (if surrounded by digit place holders) or a thousands scalar (if the comma follows all the place holders).
E- E+ e- e+ Displays in scientific format.
$ - + / ( ) : space Displays that character
\ Forces display of the following character
* Repeats the next character to fill out the column width.
_ (underscore) Leaves a space the width of the following character.
"text" Displays the text within the quotes.
@ Text place holder.

To understand better what these codes do, take a look at the information in the following table, which shows several common formats and how they affect numbers.

Category Format Value Displayed As
Number #,##0.00 .01 0.01
  .1 0.10
  1234 1,234.00
  -5678 -5,678.00
Percentage 0.00% .01 1.00%
  .1 10.00%
  1.234 123.40%
  -5.678 -567.80%
Scientific 0.00E+00 .01 1.00E-02
  .1 1.00E-01
  1234 1.23E+03
  -5678 -5.68E+03
Currency $#,##0.00_);[Red]($#,##0.00) .01 $0.01
  .1 $0.10
  1234 $1,234.00
  -5678 ($5,678.00)

No matter which format is used to display numbers, the actual accuracy of the number is not affected. Thus, if a number is displayed using two decimal places, it is still maintained internally to 15 decimal places. All calculations are performed using the more accurate internal representation.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (1939) applies to Microsoft Excel 97, 2000, 2002, and 2003.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Getting Rid of Old Windows Updates

Microsoft is constantly updating Windows for various reasons. For most people, those updates are downloaded and installed ...

Discover More

Using Sequential Document Serial Numbers

Need to add a unique serial number to each printed copy of your document? Here's a quick way to print such numbered versions.

Discover More

Understanding Macros

What is a macro? Ever wonder what these are and how to use them? This tip answers the basics of what a macro is used for, ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (menu)

Custom Formats for Scientific Notation

Excel allows you to format your numeric values in a wide variety of ways. One such formatting option is to display ...

Discover More

Changing the Percent Symbol

Some symbols can be easily changed in Excel or in Windows, such as the symbols used for currency and to separate ...

Discover More

Wrapping Your Text

Want to see all the text that is in a cell, even if it is quite a bit? You need to make sure that text wrapping is turned ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 7 + 0?

2021-05-15 23:04:10

AnonymousGlitchExe14

*!(!$#*!*!#@&$_*#$#^#%#@!*!#@#!_^!(#_1&$*!_@!^!#@#@^@#@*!&$_&#$#$!$@*!&#__/__&__\__(!$#%#%#_&!@!(#_4_$!*!.-.-.-.--.-.- Each 2 symbols are a number ( example - @! = 21 <~ which this number is a single letter ) each set of 2 numbers represent a signal letter . The two digit number is in Ancient, Greek - Arminian & Iraq. All blended together to spell out a word. (Each underscore is a space between each word).. Have fun figuring it out.


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.