Raw data is only as useful as it is readable. This lesson teaches you how to use Excel's custom number format system to display numbers, dates, and currencies exactly the way you need — without changing a single underlying value. Learn the four-section syntax, date/time codes, and professional cell formatting techniques from the ground up.

You've just inherited a spreadsheet from a colleague. It has thousands of rows of sales data, but the numbers look like this: 1234567.89, dates read as 45123, and some cells scream at you with alternating red and green fills. The data is all there — but it's nearly unreadable. You spend twenty minutes just figuring out what you're looking at before you can do any actual work.
This is a formatting problem, and it's more common than you'd think. Formatting in Excel isn't cosmetic fluff — it's the difference between a spreadsheet that communicates clearly and one that creates confusion. Done well, formatting lets the data speak for itself. Done poorly (or not at all), it forces every reader to do unnecessary mental translation.
By the end of this lesson, you'll know how to control exactly how numbers, dates, currencies, and text display in your spreadsheets — including building your own custom number formats from scratch. You'll understand why formats work the way they do, not just what buttons to click.
What you'll learn:
You should be comfortable navigating the Excel interface and working with basic cell selection. If you haven't already, it's worth familiarizing yourself with Excel Interface Mastery: Advanced Ribbon, Quick Access Toolbar, and Keyboard Shortcuts for Data Professionals before continuing. Basic formula knowledge is helpful but not required for this lesson.
Before we touch a single format setting, you need to understand one foundational concept: Excel always stores the raw value, and formats only change the display.
Type 1234.5 into a cell. That number lives in Excel's memory exactly as 1234.5. If you format it to show as $1,234.50, the cell still holds 1234.5. If you format it to show as 1,235 (no decimals), the cell still holds 1234.5. Every formula that references that cell will use the real stored value, not the visual one.
This distinction saves you from a lot of confusion. When a cell shows $45.00 but a formula returns an unexpected result, the culprit is almost always a stored value that differs from the displayed one — not a broken formula.
Key insight
Formatting is a lens, not a transformation. It changes what you see, never what's stored. The only way to actually change a value is with a formula or by editing the cell directly.
You'll spend most of your formatting life in one place: the Format Cells dialog. You can open it three ways:
The dialog has six tabs: Number, Alignment, Font, Border, Fill, and Protection. We'll cover them all, but we'll start with Number since that's where the real power lives.
Excel ships with a library of predefined formats. In the Format Cells dialog, the Category list on the left shows them all. Here's a practical guide to the most important ones:
General — Excel's default. No specific format. Numbers display as entered, and Excel makes its best guess at the type (so 1/2 becomes a date). Use this only for raw input cells.
Number — Displays numeric values with configurable decimal places and optional thousands separators. Good for counts, quantities, and plain numeric data.
Currency — Adds a currency symbol and aligns decimals. The symbol stays fixed to the left edge of the cell. Use this for financial data where every cell is the same currency.
Accounting — Similar to Currency, but the currency symbol is left-aligned in the cell and the number is right-aligned, creating a clean column. Negative numbers appear in parentheses. This is the standard for financial statements.
Date and Time — Convert Excel's internal date serial numbers into human-readable strings. More on these shortly.
Percentage — Multiplies the stored value by 100 and adds a % sign. A stored value of 0.075 becomes 7.5%. This trips up many beginners — if you type 7.5 and then apply percentage format, you get 750%.
Text — Forces Excel to treat the cell as text, even if it contains numbers. Useful for things like ZIP codes or employee IDs that happen to be numeric. Once applied, formulas won't treat the cell as a number.
Warning
Applying Text format to a cell that already contains a number doesn't convert it to text — you need to re-enter the value after changing the format. Otherwise the cell looks like text but Excel still treats it as a number internally.
Built-in formats cover most situations, but they stop short of truly professional work. Custom formats let you define exactly how a value appears using a code syntax. This is where formatting gets genuinely powerful.
Every custom format code can have up to four sections, separated by semicolons:
[Positive format]; [Negative format]; [Zero format]; [Text format]
You don't have to use all four sections. The rules are:
Here's an example for a financial report:
#,##0.00; (#,##0.00); "-"; @
This displays:
1,234.56(1,234.56)-@ is a placeholder for text)Custom format codes are built from a small set of building-block characters. Learn these and you can construct almost any format:
| Character | Meaning |
|---|---|
0 |
Digit placeholder — always shows a digit, uses 0 if none |
# |
Digit placeholder — shows digit only if significant, blank otherwise |
? |
Digit placeholder — shows space instead of 0 for alignment |
. |
Decimal point |
, |
Thousands separator (when between digit placeholders) |
% |
Multiplies by 100, adds percent sign |
@ |
Text placeholder |
"text" |
Literal text in quotes |
* |
Repeats following character to fill cell width |
_ |
Inserts a space equal to the width of the following character |
Showing units alongside numbers:
To display 5,200 units in a cell that still contains the number 5200 (so formulas can use it):
#,##0 "units"
Displaying large numbers in thousands:
When your data is in the millions and you want to show it in thousands (with a K suffix) for readability:
#,##0,"K"
A trailing comma after the digit placeholders (before the quote) divides the number by 1,000. So 1,500,000 displays as 1,500K.
For millions:
#,##0,,"M"
Phone numbers:
[<=9999999]###-####;(###) ###-####
This uses a condition in brackets — if the number has 7 or fewer digits, format as ###-####; otherwise, format with an area code.
Leading zeros for IDs:
If you need to display a 6-digit employee ID and some IDs start with zero (like 007342), use:
000000
The six zeros force exactly six digit positions, padding with leading zeros as needed.
Tip
To enter a custom format, open Format Cells (Ctrl+1), click the Number tab, scroll to the bottom of the Category list and select Custom, then type your code in the Type field. The Sample preview shows you exactly how the selected cell will look before you commit.
Dates in Excel are stored as serial numbers. January 1, 1900 is day 1, January 2 is day 2, and so on. Today's date might be stored as something like 45678. Format codes translate those serial numbers into readable dates.
| Code | Meaning | Example |
|---|---|---|
d |
Day without leading zero | 5 |
dd |
Day with leading zero | 05 |
ddd |
Abbreviated weekday | Mon |
dddd |
Full weekday name | Monday |
m |
Month without leading zero | 3 |
mm |
Month with leading zero | 03 |
mmm |
Abbreviated month | Mar |
mmmm |
Full month name | March |
yy |
Two-digit year | 24 |
yyyy |
Four-digit year | 2024 |
Mix and match these to create exactly what you need:
dddd, mmmm d, yyyy
Produces: Monday, March 4, 2024
dd-mmm-yyyy
Produces: 04-Mar-2024
mm/dd/yyyy
Produces: 03/04/2024
| Code | Meaning | Example |
|---|---|---|
h |
Hours (12-hour) | 9 |
hh |
Hours with leading zero | 09 |
H |
Hours (24-hour) | 14 |
m |
Minutes (after h or H) | 5 |
mm |
Minutes with leading zero | 05 |
s |
Seconds | 7 |
ss |
Seconds with leading zero | 07 |
AM/PM |
AM/PM indicator | PM |
Warning
The m code is context-sensitive. Immediately after an h or hh code, Excel treats it as minutes. Anywhere else, it's months. This is a frequent source of bizarre-looking date/time displays.
Combine date and time:
dd/mm/yyyy hh:mm AM/PM
Produces: 04/03/2024 09:15 AM
For durations (elapsed hours, not clock time), use square brackets:
[h]:mm:ss
This is critical for time tracking. Without the brackets, Excel wraps hours at 24. With [h], a value of 26 hours 30 minutes displays as 26:30:00 instead of 2:30:00.
If you find yourself frequently working with date extraction and manipulation using formulas, the lesson on Working with Dates, Times, and Text Functions in Excel pairs naturally with this material.
Numbers are the heart of formatting, but a professional spreadsheet also uses alignment, borders, and color strategically. These live in the other tabs of the Format Cells dialog.
The Alignment tab controls both horizontal and vertical positioning. Key options:
The Border tab lets you add lines around or inside cells. Rather than clicking individual line buttons randomly, use this workflow:
This order matters. If you click the border position first and then change the style, you'll need to re-click.
For most professional work, a light outer border on your data table and no internal borders (relying on alternating row color instead) reads more cleanly than heavy grid lines everywhere.
The Fill tab sets background color. One practical rule: use fill colors sparingly and meaningfully. If every section has a different color, color stops conveying information and just creates noise.
A common professional pattern is:
Tip
Excel's built-in Table styles (Insert → Table) apply alternating row colors, header formatting, and filter arrows automatically. If you're building a data table from scratch, this is often faster than manually formatting — and it stays consistent when rows are added or removed.
Once you've built the perfect format, you don't want to recreate it for every section of your workbook. Two tools speed this up dramatically:
Format Painter (the paintbrush icon on the Home tab):
Key shortcuts for common formats (apply directly, no dialog):
| Shortcut | Format Applied |
|---|---|
| Ctrl + Shift + 1 | Number with two decimals, thousands separator |
| Ctrl + Shift + 2 | Time format |
| Ctrl + Shift + 3 | Date format (dd-mmm-yy) |
| Ctrl + Shift + 4 | Currency format |
| Ctrl + Shift + 5 | Percentage format |
| Ctrl + Shift + 6 | Scientific notation |
| Ctrl + Shift + ~ | General (removes formatting) |
These shortcuts apply Excel's default versions of each format. If you need a specific custom variant, use Ctrl+1 to open the dialog.
Work through this exercise to cement everything you've learned. Create a new blank workbook and set up the following:
Exercise: Monthly Sales Report Formatting
In column A, enter these dates in any order: 2024-03-01, 2024-03-15, 2024-03-28. Apply a custom date format that displays them as Friday, March 1, 2024.
In column B, enter these values: 1523847.5, -230400, 0, 84500.25. Apply a custom format that shows:
$1,523,847.50($230,400.00) —Tip
To make negative numbers display in red, include the color name in brackets before the format section: [Red](#,##0.00). Excel supports eight color names: Black, White, Red, Green, Blue, Yellow, Magenta, Cyan.
In column C, enter the values 0.0854, 0.125, 0.033. Apply a custom format that shows these as 8.54%, 12.50%, 3.30% — two decimal places.
In column D, enter employee IDs: 712, 4523, 98345. Apply a format that zero-pads all of them to six digits.
Apply a dark blue fill with white bold text to the header row. Apply alternating light gray fills to the data rows. Add a bottom border to the header row. Use Format Painter to keep borders consistent.
Select the revenue column and test what happens when you use Ctrl + Shift + ~ to reset to General format. Observe that the underlying values haven't changed — only the display reverted.
This gives you a complete, professional-looking sales table built entirely with formatting, not formula changes.
"My date shows as a number like 45678" Excel hasn't recognized the value as a date, or the cell has General format after you entered a number. Apply a Date format via Ctrl+1 → Number → Date. If the number doesn't change to a recognizable date, the value might not be a proper date serial — it may have been imported as text.
"I applied percentage format but my values are 100x too large"
This is the classic percentage trap. If you type 8.5 meaning "8.5%" and then apply percentage format, Excel multiplies by 100 and shows 850%. The fix: either type 0.085 instead, or use the formula =A1/100 to convert existing values.
"Merged cells are breaking my sort/filter" Unmerge them (Home → Merge & Center to toggle off) and use Center Across Selection instead for visual centering without the functionality cost.
"My custom format code isn't doing what I expect" Check the semicolon count. If you have three sections, your third section applies to zero values — not text. Make sure the section you're editing corresponds to the value type you're testing. Use the Sample preview in the dialog to check before committing.
"Format Painter changed my formatting but also removed my formula" Format Painter only copies formatting — it never touches cell values or formulas. If a formula disappeared, you may have accidentally pressed Delete or typed over the cell instead of using Format Painter. Ctrl+Z to undo.
"My numbers align inconsistently in a column" Mixing format types causes this. Check whether some cells have Number format while others have General or Text. Also check whether some cells have extra spaces — a common problem with imported data. The lesson on Importing and Cleaning External Data in Excel: Text to Columns, Flash Fill, and Data Transformation Techniques covers how to diagnose and fix this systematically.
Once you've mastered number formats, you'll want to combine them with conditional formatting — which applies format rules automatically based on what's in the cell. For example, automatically turning a cell red when a value goes negative, or adding color scales to a revenue table so the highest values appear darkest. That's covered in depth in Advanced Data Formatting & Conditional Formatting in Excel: Expert Techniques for Data Professionals.
If you're building reports or dashboards where formatting consistency matters across many cells and tables, it's also worth reading about how to use Excel Functions like SUM, AVERAGE, COUNT, IF, and COUNTIF alongside your formatted cells — because the interaction between displayed values and calculated results is where many intermediate Excel users get tripped up.
For dashboards specifically, the visual design of your cells — how headers, data cells, and totals look — is the foundation that makes Building Interactive Dashboards with Pivot Tables genuinely readable rather than just functional.
Here's what you've built in this lesson:
0, #, ,, ., "text", @, and color tags[h] notationWhat to practice next:
Where to go from here:
If your work involves a lot of date-based calculations alongside formatting, Working with Dates, Times, and Text Functions in Excel will extend what you've learned here into formula territory. If you want to make your formatting respond dynamically to data changes, Advanced Data Formatting & Conditional Formatting in Excel is your natural next step.