1.6 Custom Number Formats
1. Give the report a clear display and keep its numbers usable
Imagine a Blinkit-inspired delivery dashboard prepared for a training class. One order took 9.5 minutes. Another took 10.5 minutes. The supervisor wants to see the unit next to each order, but the team still needs to work out an average and sort delivery times. All rows and results in this example are fictional. They show how a delivery analyst might design a workbook without describing a real company’s process.
- Type the measurement as a number. Enter
9.5in the Minutes column. Excel can calculate with the number. If you type9.5 mindirectly, Excel normally stores that entry as text. - Add the unit with a number format. The custom format
0.0 "min"displays 9.5 min. The quote marks tell Excel to print the letters in the cell without adding them to the stored number. - Verify with a calculation. If the second delivery took 10.5 minutes, the numeric average is 10 minutes. Apply another format to the average cell if you want it to show 10.0 min.
Look at the cell and then the formula bar
The formula bar sits above the worksheet grid. Select the sample input cell and compare the cell display with the formula bar. You may see 9.5 min in the grid and 9.5 above it. If the cell calculates the value, the formula bar instead shows the formula, such as =AVERAGE(D2:D3). That difference helps you decide whether the cell is a source value or a formula result. A formula cell can have a custom display of its own.
Try a simple check somewhere off the report. Enter =ISNUMBER(D2). It returns TRUE if D2 contains a numeric value. Point the same formula at a cell containing manually typed 9.5 min, and it returns FALSE. This check helps when two cells look identical on screen but only one participates correctly in calculations. It also works when investigating pasted or imported records that appear to be numbers.
2. Apply and test one custom format on desktop Excel
- Select a small test range. Start with two or three known numbers. Keep a nearby reference cell on General if you want a side-by-side comparison. Select the inputs and leave the header alone.
- Open Format Cells. In Windows use Ctrl+1. In Excel for Mac, Microsoft documents Command+1 or Control+1. You can also use the Format Cells command from the available menus in your version.
- Choose Number, then Custom. Enter your pattern in the Type box. For the delivery example enter
0.0 "min". Check the sample preview before choosing OK. - Test a real calculation. Read the values in the formula bar or use a numeric result such as
SUMorAVERAGE. Compare the result with what you calculate manually. Then widen the column if the visible display is cramped.
Microsoft documents that creating a custom format requires the desktop app. If you are using Excel for the web and cannot find the custom Type box, open the workbook in desktop Excel to create the format. The lessons’ examples and browser demonstration can still be read on a phone. Separate the device you are using for practice from the feature you are looking for.
Follow one value through the report
Enter a number
In D2 enter 9.5. In D3 enter 10.5. These are two delivery durations in minutes.
Cell Stored D2 9.5 D3 10.5 Apply the display rule
Use
0.0 "min"on D2:D3. D2 shows 9.5 min and D3 shows 10.5 min.Calculate from those cells
Enter
=AVERAGE(D2:D3)in D4. The arithmetic is (9.5 + 10.5) ÷ 2. In General, D4 shows 10.Check the value type
Enter
=ISNUMBER(D2)beside the report. Expect TRUE. Apply the same number format to D4 to show 10.0 min.
3. Build a display from placeholders and literal characters
Use 0 when a digit must appear
- Pad a numeric display. Apply
00000to the number 411. Excel can show 00411. Use this when a presentation column needs a consistent width and the value is genuinely a number in the workbook. - Keep the decimal slots visible. Apply
0.00to 8.9. Expect 8.90. The extra zero says how many decimal places the reader sees. If you add 1 to the original value, the result is 9.9 before its own formatting. - Bring your own unit when needed. Put a literal label in double quotes, including any desired space.
0.0 "kg"gives 2.4 kg for the numeric weight 2.4.
Use # for optional digits
With 0.##, a stored value of 8.9 can display as 8.9. An extra trailing zero is not required. When you compare costs, decide whether variable decimals help or make differences harder to scan. A summary of counts can often use just whole numbers. A monetary detail column usually benefits from a consistent decimal display where the workbook's audience expects paise or cents.
#,##0 uses an optional digit group followed by a required digit. In a typical English configuration, 1250 displays as 1,250. The same code shows zero as 0. Width still matters. A visual string can extend beyond what a narrow numeric column can show. Widen the column before assuming a number changed or disappeared. If the raw value comes from a system that uses a different decimal separator, make sure the input is numeric before reasoning about the custom format.
Use ? for spacing that helps alignment
A question mark is a digit placeholder that can leave space for a missing digit. Compare a column containing 5.4 and 52.18 under 0.0?. The first display includes a spare trailing position; the second uses both decimal positions. This is handy when figures should align consistently while avoiding an extra significant-looking zero. If you are sending a plain text extract or building a chart label, check what the destination reads from the workbook. Blank visual spacing is a presentation choice.
Tell the difference between a quantity and an identifier
Suppose a fictional Amazon seller has parcel code 00411. Its leading zero might be part of the identifier, just as it is for some product or postal codes. If another system needs those exact characters, preserve the column as text when entering or importing codes. A numeric 411 shown with 00000 is still 411 underneath. Padding can work for a numeric report display, while an identifier sometimes needs original text. Test the stored type and run one controlled export if the workbook will be shared with another system.
4. Route positive, negative, zero and text into separate displays
Think of a custom format as a short set of display instructions. When you give Excel four sections without conditions, it uses them in order for positive numbers, negative numbers, numeric zero and text. A semicolon is part of the format syntax and separates those instructions. The original value determines which section applies.
"₹"#,##0;[Red]("₹"#,##0);"—";@
- Positive section. A numeric 1250 can show ₹1,250 in an English-format example. The quoted rupee symbol prints as written. The group and digit placeholders supply the display.
- Negative section. A numeric -500 can show (₹500) in red. In a dedicated negative section, write the sign or parentheses you want. The parentheses ensure the meaning is visible without relying on color.
- Zero section. A genuine zero shows an em dash with this code. An empty cell is still empty, and a zero underneath a dash still counts as a numeric zero in the right calculation.
- Text section. The at sign shows the typed text. If a learner types Pending, it displays Pending. Changing the last section to
"Review " @can add visible context while leaving the text value available to formulas or filters.
Start with only the sections that do useful work
- One section.
0.0provides one pattern for numbers. Try 8.9, zero and -8.9 to see how Excel displays them with that single pattern. - Two sections without conditions. In
0.0;(0.0), the first handles positive and zero, while the second handles negative. Test zero separately before expecting a dash. - Three sections without conditions.
0.0;(0.0);"—"lets you make numeric zero look different. Add a fourth section with@when you need to control text as well. - Skipped sections. Empty sections can suppress display of a category. Choose that only when there is a clear reporting requirement and a separate control for hidden data. An invisible amount can still affect a total.
Test numeric zero, a blank, and text saying 0
Three adjacent cells can have no real amount to show, for three different reasons. One contains the number 0. The next is untouched. The third contains text typed with a preceding apostrophe, such as '0. If your custom format shows a dash for zero, the numeric cell shows the dash, the blank remains blank, and the text cell follows the text section. A filter or chart may treat those values differently. Use ISNUMBER to test the type when recomputing a total. A separate completeness check can distinguish an empty allocation from an amount intentionally set to zero.
This distinction matters in a fictional marketplace report. A zero refund could mean the team checked a claim and determined there is no refund. A blank could mean review is still pending. Hiding both visually with no legend can make the number easier to scan and harder to interpret. Use an explicit status column if the difference is important. Formatting supports the story while the workbook model still states what each entry means.
5. Label thresholds and percentages without changing the input
Use the right condition for the right measurement
Suppose a fictional Swiggy training workbook wants to display delivery duration based on a 15-minute target. This target is chosen for the lesson. It does not represent any real service standard. Start with numeric values 14, 15 and 16. Apply this pattern to the sample cells.
[Red][>15]0 "min late";[Blue][<=15]0 "min within"
- 14 and 15 qualify for the second rule. They can show 14 min within and 15 min within. Test the exact threshold so an inclusive comparison is intentional.
- 16 qualifies for the first rule. It can show 16 min late. That is a total duration of 16 minutes with a status label. If you want to show how far past the target it was, calculate the difference in its own numeric field, for example 16 minus 15.
- The strings communicate state without color. A colleague who cannot easily distinguish blue and red can still read the words. Conditional Formatting with a rule can be a better fit when you want an independent fill color or highlight based on another cell.
Use condition codes carefully because conditional sections use their own comparisons rather than the standard unconditioned positive, negative and zero assignment. Test each threshold with a value below, exactly on and above the boundary. Try unexpected data types or out-of-scope values too. In this exercise delivery durations should be nonnegative. A negative value needs an investigation or input validation rather than a condition that silently assigns a reassuring display. A number format alone does not validate an entry.
Enter the underlying rate in General before formatting
- Enter the fraction. In a General cell type
0.125. With0.0%it shows 12.5%. The percent marker scales the number for display. - Compare a common slip. If you type the General value
12.5and then apply0.0%, the cell can show 1250.0%. Excel multiplies by 100 for the view because the underlying number is already larger than one. - Use typed percent deliberately. When you type
12.5%, Excel recognizes a percentage entry in supported settings. Inspect its numeric value with a calculation to see which quantity the spreadsheet uses. Behavior for later entries in cells already formatted as Percentage can differ from the General-first test, so start the lab with General.
In a fictional Instagram campaign tracker, an analyst may compare a positive change of 0.125 and a negative change of -0.08. Use [Blue]+0.0%;[Red]-0.0%;"—";@ if you want clearly signed results. Expect +12.5% and -8.0%. The numbers remain 0.125 and -0.08 underneath. Confirm whether the metric represents a change in a rate or an absolute percentage-point difference. The display sign makes patterns visible but does not define the business metric. Use a heading or nearby note for that meaning.
6. Choose decimal precision and scaling for the reader
Set display precision separately from the accounting rule
In a fictional Amazon seller workbook the approved sample order value is 1250.50 rupees. If a dashboard uses "₹"#,##0, the numeric input can display ₹1,251. In another task the detail report may need "₹"#,##0.00, which shows ₹1,250.50 in the English-format example. Both ordinarily use the underlying amount 1250.50 in calculations. The display is one form of rounding. A different formula or payment rule may require a separate rounded amount. Discuss that requirement before using ROUND, which computes a new value.
Excel has a workbook calculation option called Set precision as displayed. It can change stored numeric values to the displayed precision. Leave that option off for these exercises. It is a separate workbook-wide decision with lasting effects, and it should never be used as an easy fix for one confusing total. If you are handed someone else's workbook, check its calculation settings and preserve the original before experimenting with precision.
Grouping and scaling commas serve different roles
- Grouping comma inside the digit pattern.
#,##0presents a large count such as 1,250,000 with separators under typical English grouping. The value is still one million two hundred fifty thousand. - One comma after a digit placeholder.
0.0, "K"can present 12000 as 12.0 K. The scale is one thousand to one for the display. - Two trailing commas.
0.0,, "M"can show 2345000 as 2.3 M. The scaling divides the appearance by one million. A source amount still adds as 2345000. - Lakh is a separate unit choice. One lakh is 100000, while the trailing comma operation goes by thousands. If you need a number shown in lakhs, compute a numeric helper such as
=B2/100000and format it as0.0 "lakh". Label the helper and keep the raw amount for sums or export.
Grouping styles can follow language and region settings. A rupee character placed in quotes identifies a symbol, but it does not select a regional grouping convention or convert another currency into rupees. Refer to the previous number-format lesson and test the values below and above one lakh in the actual workbook where readers will use it. For money exchanged between systems, store the applicable currency code separately if needed. A helpful display can coexist with unambiguous source data.
7. Show calendar dates and elapsed times with different patterns
Excel can store a date and time as a numeric value. A whole day is one unit in that system. A part of a day can describe a time or duration. The format interprets the value for the reader. Tell the reader whether a field is a calendar date, a clock time, minutes as a plain number or an elapsed duration. Mixing those conventions in one unlabeled column can make all the math look reasonable while giving the wrong result.
Turn an actual date into a readable label
- Type
=DATE(2026,11,3)in a fresh cell. The function builds the date from year, month and day. It avoids the ambiguity of typing a short string such as03/11/26. - Apply
ddd, dd-mmm-yyyy. In an English configuration the preview should read Tue, 03-Nov-2026. If the app uses a different language, the abbreviations can differ. - In another cell, add 1 to the original date and apply the same display pattern. Expect Wed, 04-Nov-2026 in English. The value still supports date arithmetic and chronological sorting.
The strings produced by date formatting can be appropriate for weekly summaries, but a true grouping by week requires a defined start date or calendar rule. Showing only the weekday does not combine all Tuesdays into one worksheet value. Two distinct dates can both look like Tue. Keep a full date available when decisions require an exact day.
Store a duration in the right unit
A fictional Netflix-inspired viewing log lists a training playlist totaling 30 hours across several sessions. The exercise total 30/24 is 1.25 days. If you use h:mm, Excel can display the clock portion as 6:00 because it has advanced one full day. If you use [h]:mm, it can display the elapsed total 30:00. Square brackets here tell Excel to show accumulated hours across the day boundary.
- Plain minutes. A column of 9.5 and 10.5 is measured in decimal minutes. Use a literal label for 10.0 min after calculating its average. Applying an elapsed time format directly to 9.5 would interpret it as 9.5 days.
- Elapsed time. If you decide to store nine and a half minutes as an Excel day fraction, calculate
=9.5/1440and use an appropriate elapsed minutes-and-seconds display. The number comes from 24 hours times 60 minutes per day. - Clock time. If you have a real arrival timestamp, verify the date and applicable time context before subtracting it from the departure timestamp. Format the calculated duration after the arithmetic. A time-only display can hide which day an event occurred on.
8. Lab A · Add units to the delivery report and verify the average
Use a new worksheet named DeliveryLab in a practice workbook. Desktop Excel is needed to create the custom pattern. The rows represent fictional orders for a Blinkit-inspired operations exercise. For this lab, column D contains whole or decimal numbers measured in minutes. Leave workbook precision settings at their normal full-precision behavior.
| Row | A · Order | D · Minutes |
|---|---|---|
| 2 | BL-126 | 9.5 |
| 3 | BL-127 | 10.5 |
| 4 | BL-128 | 12 |
| 5 | BL-129 | 8 |
- Enter and check the raw values. Add headings in A1 and D1, then fill the four data rows. In F2 enter
=COUNT(D2:D5). It should report 4. Count gives you a quick check that all four durations are numeric. Fix any interpreted text before applying a display. - Add minute labels. Select just D2:D5 and apply
0.0 "min". The visible examples are 9.5 min, 10.5 min, 12.0 min and 8.0 min. Select D2. The formula bar should reveal the numeric input 9.5. F2 should still show 4. - Verify the average and total. In F3 enter
=AVERAGE(D2:D5)and in F4 enter=SUM(D2:D5). Expect 10 and 40 respectively before custom formatting. Apply0.0 "min"to these result cells if you want 10.0 min and 40.0 min. - Introduce one intentional data mistake. In this practice copy only, replace D5 with the text
8 min. F2 should fall to 3. The average now uses 9.5, 10.5 and 12. The result is about 10.6667, or 10.7 min under the display format. The total falls to 32. The text has the same unit but was excluded by these range-based calculations. - Fix the value and verify recovery. Type the number
8again in D5. Reapply the display code if needed. Expect Count 4, Average 10 and Sum 40 again. This check shows that the data type mattered. Deleting the unit from a column heading or widening the display alone would not have changed the input type.
Make the lab result portable
When you save the practice workbook, record the worksheet, columns, four expected raw values and the two accepted results. A colleague using a different decimal separator or language can recognize whether they entered numeric values. If 9.5 was interpreted incorrectly in their local settings, they can use their installation’s expected decimal separator and confirm with Count. Do not send a screenshot as the only proof of useful numbers. Open or recalculate the actual workbook when evaluating it.
For a handoff to an application or data team, choose a numerical source column with the appropriate unit in its header. Add a separately labeled text field only when the recipient explicitly needs a text string. Neither a formatted cell nor a screenshot alone tells you what another tool will parse. Test one controlled file or sample row and compare the received type and value before exporting thousands of entries.
9. Lab B · Show refunds, zero and pending status in a seller report
Make a fresh SellerLab worksheet. The data is for a fictional marketplace seller. Type 1250.5, -500 and 0 as numbers into B2, B3 and B4. Type Pending in B5. Leave B6 untouched. Use an English-style sample workbook for the written preview, or compare it with your local grouping and symbols. The accepted numeric results are independent of the visible separators.
- Record the controls first. In D2 enter
=COUNT(B2:B6). Expect 3. In D3 enter=SUM(B2:B6). Expect 750.5. These two numbers are your baseline. - Apply the four-part code from point 4. Format B2:B6. Expect about ₹1,251, (₹500) in red, —, Pending, then blank. Compare B4 and B6. They have separate meaning even in a compact finance report. In a very narrow column, widen the value field before interpreting the strings.
- Check that the calculation survived. D2 is still 3 and D3 is still 750.5. Format D3 with
"₹"#,##0.00. Its display is ₹750.50. The listed labels on the detail rows do not change the original amount returned by the SUM. - Test a signed percentage in a separate column. Put 0.125 and -0.08 in E2:E3 as General numbers. Enter 0 in E4. Apply
[Blue]+0.0%;[Red]-0.0%;"—";@. Expect +12.5%, -8.0% and a dash. In F2 add E2 and E3. The result is 0.045, which displays as 4.5% after applying0.0%. This is test arithmetic, not a rule that any two business rates should be added. - Save a clean result. Keep the inputs and visible controls. Add a header describing the currency and rate meanings. Preview the worksheet as a reader and confirm that negative amounts remain distinguishable without red. Restore General on a copy of a few cells to show you can distinguish the saved values from the display.
Extend the experiment with an explicit point-in-time date
Add the date created with =DATE(2026,11,3) in a spare cell, and a second value =30/24 beside it. Apply the weekday date pattern and elapsed hour pattern from point 7. Check Tuesday and 30:00 as separate results. If Excel shows 6:00 for the duration, inspect whether the brackets were omitted around the hour token. If you get an unexpected weekday, inspect what date the cell actually holds before changing the display. The lab is complete when you can name the stored unit and justify each visible result.
10. Troubleshoot from the visible symptom
The formatted cell displays hash marks
Widen the column first. Numeric, date and time results sometimes display ##### when the cell is too narrow. With a date or time, also check whether the underlying value is a negative result in a setup that cannot display it with that format. Inspect the actual calculation in a safe General cell and verify your units and subtraction order. Do not erase the cell merely to clear the visible symptom. A known before-and-after result helps distinguish a width problem from a calculation or type issue.
The amount changed position in a text export
Keep the original .xlsx as the working copy so formulas, formats and other workbook features remain available. Excel's comma-delimited export is a plain text representation and can carry the displayed text and values of the active sheet. It does not carry the reusable custom-format definition. A recipient may now see a literal unit or grouping character and import that field as text. Export a controlled sample and ask the destination which type and unit it imported. Use a separate numeric export range with a clear heading if the receiving system needs raw numbers. Do not rely on a workbook-only display rule to repair an interchange format.
The number looks correct but a chart or formula misses it
Test ISNUMBER and COUNT. If an imported or concatenated cell is text, applying a numeric custom format generally does not convert it into a number. Inspect the source format and convert deliberately using your locale and input rules. Compare a few known rows after conversion. If the field must be a caption, a formula such as =TEXT(D2,"0.0")&" min" can create a dedicated text label. Keep the numeric D column for arithmetic. A caption and its source can coexist when you label their purpose clearly.
The format is not accepted or shows a strange separator
Start from a built-in example in your own Excel installation. Add one change at a time and test in a simple cell. Check that you used straight double quotes around literal text and the correct local separator. Confirm the selected display type and workbook language. If a colleague's locale shows the same numerical quantity with different separator characters or month labels, agree what actually needs to match. Is the requirement the numeric value, the exact local label, or a standardized export? The answer determines which result to check.
11. Quiz · Predict the display and the math
1. A cell stores 7.25. With 0.0 "kg", what does the cell show and what will a sum use?
Under the English-style display, the cell shows 7.3 kg. A normal calculation still reads 7.25. The format sets one visible decimal place and adds a literal label. Use an explicit rounding formula only if the actual calculation needs the rounded quantity.
2. A two-section format has no conditions. Which section receives numeric zero?
The first section covers positive values and zero. A two-section format does not give zero a separate display rule. Add a third section if you need an explicit zero display and test a truly empty cell separately.
3. 00000 displays 00411. Does a numeric field now store a five-character ID?
It still stores the number 411. The format pads its display to five places. If the identifier must stay precisely 00411 in another tool, use actual text as the identifier and test the receiving workflow.
4. A duration totals 1.25 days. Which pattern reads as thirty hours?
[h]:mm displays 30:00. h:mm displays the hour within the day, which leaves 6:00 in this example. The value still expresses one and one-quarter days in both cases.
5. Which of 14, 15 and 16 goes into the later-than-15 section?
Only 16 satisfies >15. The value 15 belongs to <=15. Test exactly the boundary as well as the two values around it before publishing a status display.
6. Why does the average rise when an 8-minute entry changes into text?
The numeric range average now excludes the text and computes 32 divided by 3 instead of 40 divided by 4. The average moves from 10 to about 10.6667. The fastest order did not become slower. It was omitted from the numeric inputs.
12. Interview questions with explained answers
1. How would you show units and keep a dashboard usable for arithmetic?
I would store numbers in a clearly labeled source column and apply the custom format appropriate to that unit. Then I would verify a known input with ISNUMBER and check a meaningful result such as sum or average. If a tool needs a text caption, I would provide a separate text output and leave the numeric source available.
2. How would you explain the pattern "₹"#,##0;[Red]("₹"#,##0);"—";@?
I would test four known values. They should show the intended rupee grouping for a positive amount, marked parentheses for a negative amount, a dash for numeric zero and the typed text for the fourth section. I would also compare a blank and run a numeric total to confirm the display did not erase the zero or negative value.
3. How can two displayed amount labels disagree with a correct total?
Individual cell formats can present rounded views while the total uses the underlying numeric inputs. I would show one extra decimal place and compare the raw values. If business rules require actually rounded amounts, I would choose and document the rounding point instead of changing workbook-wide precision.
4. Which would you use to flag negative margins, custom formatting or Conditional Formatting?
It depends on the requested effect. An explicit negative display with parentheses and color can be handled by the format's negative section. A fill, icon set or comparison with another cell can be an independent Conditional Formatting rule. I would test both the positive and negative displays in the reader's viewing environment and ensure the mark makes sense without color.
5. How do you make a beginner's date example work across locales?
I can construct a real date with a year, month and day, apply the desired pattern, and verify one known weekday and a one-day increment. I would tell learners that localized names, decimal separators and available UI controls can differ. The worksheet still needs a real date that can be sorted and used in arithmetic.
13. Revision cards
- Keep source values usable Store 9.5 as a number. Add a unit with a display rule and check the result with a calculation.
- Pick the placeholder 0 shows a required position. # allows an optional digit. ? can keep alignment space.
- Check all four sections Use a positive, negative, zero and text sample. Check a blank separately.
- Point the comma correctly Inside a digit pattern it groups. Trailing positions can scale the display by powers of a thousand.
- Treat dates and durations as different A calendar date can show its weekday. Bracketed hours can show the full elapsed time.
- Use the right test The formula bar,
COUNT, an expected result and a controlled export answer different questions.
Try the first lab once without looking at the answers. Then explain the one intentionally excluded text value before restoring the clean number. Continue to Freeze Panes to keep information visible while examining a wide or long report.
Microsoft references
- Custom number format rules and examples
- Create a custom number format in desktop Excel
- Windows and Mac Format Cells shortcuts
- Add or subtract time and show totals beyond 24 hours
- Excel AVERAGE and handling text in range arguments
- Recalculation and precision settings
- What changes when Excel saves to CSV or text