Excel tutorial
/

Formatting

Advanced

Custom number formats in Excel: currency text, codes, colors and hiding

Excel custom format codes: add “UZS”, keep 00125 codes, [Red] colors, hide values with ;;;, dddd weekdays and [h]:mm — with examples and traps.

When the built-in formats aren’t enough, you write a Custom format. It is a short code that tells Excel how to display a number: for example, #,##0" UZS" shows 1500000 as “1,500,000 UZS”.

The key point: the cell still holds a number. SUM, sorting and charts work as usual. If you typed “1,500,000 UZS” by hand, you would get text that can’t be calculated. A custom format gives you both: a clean look and full calculations.

Книга1 - Excel
—☐✕
fx
ABCDE
1ProductCodePriceChange
2Rice0012518 000 UZS▲ 12.0%
3Oil0034232 000 UZS▼ 4.5%
4Sugar0120714 500 UZS▲ 3.0%
5Flour000889 000 UZS0.0%
6
Готово
The cells hold plain numbers: 125, 18000, 0.12. The zeros, “UZS”, arrows and colors all come from custom formats

Creating a custom format

1

Select the cells (for example, prices in C2:C5) and press Ctrl + 1.

Книга1 - Excel
—☐✕
C2fx18000
ABCD
1ProductCodePrice
2Rice125180001
3Oil34232000
4Sugar120714500
5Flour889000
6
ГотовоСреднее: 18375Количество: 4Сумма: 73500

2

In Format Cells, open the Number tab and choose Custom at the bottom of the list. The Type box and a list of ready-made codes appear on the right.

3

Type the code into the Type box: #,##0" UZS". The Sample box above shows the result immediately, so you can fix mistakes on the spot.

Книга1 - Excel
—☐✕
C2fx18000
ABCD
1ProductCodePrice
2Rice12518000
3Oil34232000
4Sugar120714500
5Flour889000
6
ГотовоСреднее: 18375Количество: 4Сумма: 73500

4

Click OK. Look at the formula bar: C2 still holds 18000 — only the display changed. Give the Code column the 00000 format the same way.

Книга1 - Excel
—☐✕
C2fx18000
ABCD
1ProductCodePrice
2Rice12518 000 UZS
3Oil34232 000 UZS
4Sugar120714 500 UZS
5Flour889 000 UZS
6
Готово
Prices now show “UZS”, but the formula bar shows the plain number 18000

The “alphabet” of format codes

The codes below are for English regional settings (dot for decimals, comma for thousands):

  • 0 — required digit: if the number is shorter, a 0 is shown in its place. With 00000, 125 → 00125.
  • # — optional digit: shows no extra zeros.
  • Comma (#,##0) — thousands separator; dot (0.00) — decimal part.
  • "text" — text in quotes is shown as is: " UZS", " kg".
  • % — multiplies by 100 and adds %.
  • @ — placeholder for text: "ID-"@ → ID-Aziz.
  • [Red], [Blue], [Green] — color; numbered colors like [Color10] exist too.
  • Dates: dd — day, ddd/dddd — weekday (short/full), mm/mmmm — month number/name, yyyy — year.
Книга1 - Excel
—☐✕
fx
ABCD
1ValueFormat codeDisplays as
21500000#,##0" UZS"1,500,000 UZS
31250000000125
4901234567"+998 "00" "000-00-00+998 90 123-45-67
545658ddddWednesday
645658mmmm yyyyJanuary 2025
7-350000#,##0;[Red]-#,##0-350,000
80#,##0;-#,##0;"—"—
9
Готово
Column C shows how Excel displays the number in column A with the code in column B. Day and month names follow your system language

Four sections: positive; negative; zero; text

A code can have up to 4 sections separated by semicolons: positive;negative;zero;text.

  • #,##0;[Red]-#,##0 — negative numbers in red.
  • #,##0;(#,##0);"—" — negatives in parentheses, a dash instead of zero (like in financial statements).
  • ;;; — every section empty: nothing is visible in the cell, but the value is still there and formulas use it.

Note: in the second section you add the minus sign yourself. With #,##0;#,##0, −350,000 is displayed as 350,000.

Книга1 - Excel
—☐✕
B2fx5200000
ABCD
1EmployeeSalaryTotal
2Aziz5200000116 100 000
3Dilnoza6100000
4Javohir4800000
5
Готово
Column B uses ;;; — salaries are invisible, yet the formula bar shows 5200000 and SUM still adds them

Pro level: hours, thousands, conditions

  • Time over 24 hours. When you add up working hours, hh:mm shows 28 hours as 04:00 — it drops whole days. The right code is [h]:mm. The square brackets mean “hours without rolling over into days”.
  • In thousands and millions. A thousands separator at the end of the code divides the number by 1000: #,##0," K" → 2,400,000 = “2,400 K”. Two separators divide by a million: 0.0,," mln" → “2.4 mln”.
  • Conditions. You can put up to 2 conditions in square brackets: [>=90]"Excellent";[>=70]"Good";"Pass" — the score stays a number but is displayed as a word.
  • Neat arrows. [Color10]"▲ "0.0%;[Red]"▼ "0.0%;0.0% — growth in dark green, decline in red. [Green] is a harsh bright green; [Color10] is much easier to read.
Книга1 - Excel
—☐✕
fx
ABCD
1DayHours worked
2Monday09:00
3Tuesday10:00
4Wednesday09:00
5Total — hh:mm04:001
6Total — [h]:mm28:002
7
Готово
9 + 10 + 9 = 28 hours. The hh:mm format shows 04:00 (1), while [h]:mm gets it right: 28:00 (2)

Has ExcelLab been useful?

Support the project and help us release new lessons and exercises.

Support us
Previous

34 / 154