Excel offers numerous ways to format numbers, giving you precise control over how data appears in your spreadsheets. The Home tab's Number group provides quick access to common formatting options through its dropdown menu:

For more advanced formatting control, press Ctrl+1 on any selected cells, or click "More Number Formats..." at the bottom of the dropdown to access the comprehensive Format Cells dialog:

Excel also provides convenient keyboard shortcuts accessible through the "General" dropdown in the Number group:

However, the true power lies in the Custom category, which unlocks Excel's full formatting potential. This section reveals an extensive library of formatting codes and allows you to create your own custom formats:

Excel automatically applies formatting based on how you enter data. Enter "5/6/29" and Excel recognizes it as a date. Type "$123" and it becomes currency formatting. Enter "$1234" and Excel intelligently adds comma separators for currency display. Similarly, "10%" automatically applies percentage formatting. However, this automation can sometimes produce unexpected results—enter "1/2" expecting a fraction, and Excel interprets it as January 2nd, displaying "2-Jan." To properly enter fractions, include a leading whole number like "0 1/2" to get the desired 1/2 display.
Understanding Excel's formatting codes transforms you from a casual user into a formatting master. The key characters you'll master are: 0, comma (,), #, parentheses, [color], semicolon (;), $, %, ?, m, d, y, AM/PM, *, and _. Each serves a specific purpose in creating precisely formatted displays for your data.
Let's begin with the General format (shortcut: Ctrl+Shift+~). This represents Excel's "raw" display with no specific formatting applied. When you apply General formatting to a cell containing 4%, you'll see 0.04—the underlying decimal value. Similarly, applying General format to a date like 5/6/29 reveals Excel's internal "serial number" system: 47244, representing the 47,244th day since January 1, 1900. This serial number system is fundamental to how Excel handles dates and enables date calculations.
The "0" code forces Excel to display a digit in that position, padding with zeros when necessary. A format of "0,000" ensures at least five digits appear—invaluable for zip codes that begin with zero. The value 1234 formatted with a single "0" displays as 1234, while 12 formatted as "00,000" becomes 000012. This affects only the visual display; the underlying value remains unchanged. A decimal like 2.3 with format "00.00" displays as 02.30, providing consistent alignment in columnar data.
The comma serves dual purposes in Excel formatting. Primarily, it displays thousands separators—1234 formatted as "0,000" shows 01234, while "00,000" produces 01,234. More powerfully, ending a format with a comma divides the displayed value by 1,000. The value 1234567 formatted as "0,000," displays as 1,235 (note the rounding). This technique is invaluable for financial reports where you want to show values in thousands or millions without altering the underlying data.
The "#" placeholder displays digits only when they're non-zero, creating cleaner formatting than forced zeros. A value of 1234 with format "#,###" shows 1,234, and 12345 displays as 12,345. Excel's intelligence shines here—you don't need "#,###,###" for seven-digit numbers; "#,###" automatically extends. Multiple trailing commas increase the division factor: "#,##," divides by 1,000, while "#,###,," divides by 1,000,000—perfect for displaying large financial figures in abbreviated form.
The period (.) positions decimal points precisely. A value of 45.99 with format "#,###.00" displays as 45.99, while 0 shows as .00. To display 0.00, use a format like "0.00" or "#,##0.00" to ensure the leading zero appears for values less than one.
The semicolon (;) separates four distinct formatting sections: positive numbers, negative numbers, zero values, and text. This powerful feature allows complete control over how different data types appear. For example, "#,###;0,000;;" formats positive values as "#,###", negative values as "0,000", and displays nothing for zero or text values. The value 55 appears as 55, -55 displays as 0,055, and zero or text entries remain invisible.
Currency formatting uses the "$" symbol intuitively. The value 12345 with format "$#,###.00" displays as $12,345.00. This approach works for any currency symbol, making Excel adaptable to international financial reporting.
Parentheses provide the traditional accounting method for displaying negative numbers. Instead of -55, you might prefer (55) or ($55.00). The format "#,##0;(#,##0)" shows 55 as 55 and -55 as (55). However, notice how this affects alignment:

The decimal points don't align properly, creating an unprofessional appearance. The underscore code solves this alignment issue.
The underscore (_) reserves space equal to the width of the following character. The format "#,###_)" leaves space for a right parenthesis, ensuring proper decimal alignment. Using "#,##0.00_);(#,##0.00)" produces this aligned result:

Perfect decimal alignment! The positive number includes trailing space exactly equal to a parenthesis width. You can use any character after the underscore—"#,##0.00_W" would reserve space for the letter W.
Color formatting adds visual impact by placing color codes in square brackets within any formatting section. The format "[blue]0;[red]0" displays positive values in blue and negative values in red, both as integers only:

Available colors include red, blue, black, green, yellow, cyan, magenta, white, and color1 through color56. White formatting proves useful on dark-colored cells where normal text would be invisible:

Date formatting employs M, d, and y codes with case-insensitive flexibility. "M" displays months with 1-2 digits (8), "mm" forces 2 digits (08), "mmm" shows 3-character abbreviations (Aug), and "mmmm" displays full month names (August). Day codes follow similar patterns: "d" shows 1-2 digits, "dd" forces 2 digits, "ddd" displays 3-character weekdays (Mon), and "dddd" shows full weekday names (Monday). The "ddddd" code displays just the first letter—useful for compact chart labels. Year codes "y" or "yy" show 2-digit years, while "yyy" or "yyyy" display 4-digit years.
Time formatting uses H, m, and s codes, with context determining whether "m" represents months or minutes. The presence of colons signals time formatting—"h:mm" clearly indicates hours and minutes. The format "h:mm AM/PM" (note the important space) displays 12-hour time with meridiem indicators. Excel's fractional day system means 0.75 (three-quarters of a day) formatted as "h:mm AM/PM" displays as 6:00 PM, while 0.25 shows as 6:00 AM.
Standard time formats reset after 23:59:59, so 22:00 + 5:00 displays as 3:00. Override this behavior with brackets: "[h]" allows hours beyond 24, "[m]" shows total minutes, and "[s]" displays total seconds. The time 2:30 PM formatted as "[m]" reveals 870 total minutes, demonstrating Excel's underlying time calculations.
Percentage formatting using "%" is straightforward—the value 1 formatted as "0%" displays as 100%, automatically converting decimal values to percentage display.
Fraction formatting uses question marks for flexible denominators. The value 0.25 formatted as "# ?/?" displays as 1/4, with Excel finding the best representation. Specify denominators with formats like "# ?/8" to force eighths (showing 2/8 for 0.25). Complex decimals like 0.338291102831665 formatted as "# ?/?" become precise fractions like 8825/26087.
Scientific notation employs the E code for exponential display. The value 276384726 formatted as "0.00E+00" shows as 2.76E+08. Alternative formats like "##0.0E+0" produce 276.4E+6, giving you control over significant digit placement.
The asterisk (*) fills cells with repeating characters, similar to the underscore but with repetition. The value 12 with format "*X0" produces:

Widening the cell adds more X characters:

This technique is commonly used for check protection in financial documents. The format "$**#,###" shows 1234 as $***1,234, with asterisks filling available space. Any character works—here's an example with periods:

Text integration in number formats allows custom messaging. The format "The answer is "0 displays 123 as "The answer is 123". The @ symbol represents cell text content, so "My name is "@ with the value Bob shows "My name is Bob".
Finally, Excel's TEXT function brings these formatting capabilities into formulas. Any format code (except colors) works within TEXT functions, enabling dynamic formatting based on calculations:

Note the correction in row 3 versus the common error in row 4—proper syntax is crucial for TEXT function success.
Mastering these formatting codes elevates your Excel proficiency from basic data entry to professional presentation. These techniques ensure your spreadsheets communicate clearly, maintain visual consistency, and meet professional standards for financial reporting, data analysis, and business presentations.