Create custom number formats
- 1Select the cells.
- 2Ctrl+1 to open Format Cells, Number tab, Category Custom.
- 3In Type, enter the code, for example 0.0" kg". OK.
A custom number format changes how a number looks, not the number. Text in the code goes in quotes, and up to four sections set positive;negative;zero;text.
What the MO-211 task asks
Every one of our ten MO-211 practice exams has a custom number format task, described by its result: “Apply a custom number format to the Length values in D4:D31 so each shows one decimal place followed by ft — for example 28.5 ft,” or “so each shows whole thousands followed by K — for example 14,280 shows as 14K.”
Our grader reads what the cells display, and for a format with a negative section it also tries a negative number. So a code that shows the right result passes, and typing the unit into the cell does not.
The example in the task is the test: work out the code, apply it, and check that the cell shows exactly that.
Worked examples
Set up the grid below to follow along. Each example starts from it as shown; every result is what Excel showed.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Item | Weight | Code | Sales | Change |
| 2 | Flour | 12.5 | 7 | 14280 | -1250 |
| 3 | Rice | 12 | 42 | 14780 | 0 |
| 4 | Salt | 3.25 | 105 | 950 | 1250 |
- 1Select B2:B4. Ctrl+1, Custom, Type 0.0" kg". OK.
0.0 shows one decimal place, rounding 3.25 to 3.3; the text in quotes follows it.
- 1Select C2:C4. Custom, Type 000. OK.
Each 0 is a digit that always shows. A longer number shows in full.
- 1Select D2:D4. Custom, Type #,##0,"K". OK.
The comma after the last 0 divides by 1,000 for display, and rounds: 14,780 shows as 15K, 950 as 1K.
- 1Select E2:E4. Custom, Type #,##0;[Red](#,##0);"-". OK.
Three sections: positive; negative; zero. The negative section adds the brackets and the colour.
- 1With B2 showing 12.5 kg, type =B2*2 in F2.
Formulas use the number, 12.5. Typing 12.5 kg into a cell instead makes it text, and =B2*2 on that gives #VALUE!.
- 1B2:B4: Custom 0.0" kg".
- 2E2:E4: Custom #,##0;[Red](#,##0);"-".
The first and fourth examples, done in Excel on the same sheet.
Watch it done in Excel
The last example above, recorded in real Excel on the same grid.
Exam traps
12.5 kg typed into a cell is text: it cannot be added up, and our grader reads the format, not the typing. Put the unit in the format code.
Excel refuses 0.0 kg as a format code: the letters need quotes, 0.0" kg".
In #,##0,"K" the last comma divides by 1,000 and rounds the display. That is what the K task wants, but leave it out of an ordinary thousands separator.
The order is always positive; negative; zero; text. A red section written first colours the positive numbers instead.
FAQ
Does a number format change the value?
No. A cell holding 1234.5 and formatted as 0 shows 1235, but doubling it with a formula still gives 2469.
Where do I type the code?
Format Cells (Ctrl+1) › Number › Custom, in the Type box.
What does [Red] do?
It colours that section's numbers. In #,##0;[Red](#,##0) negatives show red in brackets and positives keep the normal colour.
Can a format add text to text?
Yes, in the text section: with "Room "@ the text Fern shows as Room Fern.
New to this?
This page covers what the exam asks. For the full how-to, read our guide on dfwexcel.com.
Custom number format codes — dfwexcel.comTry it under exam conditions
Take a full, timed MO-211 practice exam, upload the workbook you built, and get a score out of 1000 with a per-task breakdown of where the points went. Your first one is free.
No credit card needed.
