Maintenance Notification: We are upgrading our servers today so you may experience intermediate outages. Thank you for your patience.
Format and validate data
MO-211

Create custom number formats

  1. 1Select the cells.
  2. 2Ctrl+1 to open Format Cells, Number tab, Category Custom.
  3. 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.

Stock (as typed, before formatting)
ABCDE
1ItemWeightCodeSalesChange
2Flour12.5714280-1250
3Rice1242147800
4Salt3.251059501250
A unit after the number
Do this
  1. 1Select B2:B4. Ctrl+1, Custom, Type 0.0" kg". OK.
Excel shows12.5 kg · 12.0 kg · 3.3 kg

0.0 shows one decimal place, rounding 3.25 to 3.3; the text in quotes follows it.

Leading zeros
Do this
  1. 1Select C2:C4. Custom, Type 000. OK.
Excel shows007 · 042 · 105

Each 0 is a digit that always shows. A longer number shows in full.

Thousands as K
Do this
  1. 1Select D2:D4. Custom, Type #,##0,"K". OK.
Excel shows14K · 15K · 1K

The comma after the last 0 divides by 1,000 for display, and rounds: 14,780 shows as 15K, 950 as 1K.

Negatives in red, zero as a dash
Do this
  1. 1Select E2:E4. Custom, Type #,##0;[Red](#,##0);"-". OK.
Excel shows(1,250) in red · - · 1,250

Three sections: positive; negative; zero. The negative section adds the brackets and the colour.

The value does not change
Do this
  1. 1With B2 showing 12.5 kg, type =B2*2 in F2.
Excel showsA result of 25: double 12.5

Formulas use the number, 12.5. Typing 12.5 kg into a cell instead makes it text, and =B2*2 on that gives #VALUE!.

In the video
Do this
  1. 1B2:B4: Custom 0.0" kg".
  2. 2E2:E4: Custom #,##0;[Red](#,##0);"-".
Excel shows12.5 kg · 12.0 kg · 3.3 kg, and (1,250) · - · 1,250

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

Typing the unit into the cell

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.

Text without quotes

Excel refuses 0.0 kg as a format code: the letters need quotes, 0.0" kg".

A comma that scales

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.

Sections in the wrong order

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.com

Try 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.