Can Excel Custom Number Formats Display Values as Dozens?
Question details
The user wants to format standard numerical values (such as 128) into a dozens format (such as 10 dozen and 8 units) using Excel's custom number formatting, without relying on helper formulas.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Formatting raw data to natively display quantities in dozens for inventory or reporting, while avoiding the creation of extra calculation columns.
- Observed behavior
- Custom number formats only alter the visual display of the number. They cannot mathematically interpret, divide, or calculate the remainder of the underlying value to dynamically split it into dozens and units.
Before proceeding, note that custom number formats in Excel are designed only to change visual appearance, not to perform math. To execute the division and remainder calculations required for a dozens format, you must use a formula or an automated VBA script.
Use QUOTIENT and MOD Formulas to Calculate Dozens
Since custom formatting cannot perform mathematical operations, you can use a combination of the QUOTIENT and MOD functions in a helper column to calculate and display the exact number of dozens and remaining units.
This method creates a text string based on your original number. It is the safest and most reliable way to achieve the conversion while preserving your original raw data for other calculations.
Click on a blank cell immediately adjacent to the base number you want to convert.
Type the formula `=QUOTIENT(A1,12) & "-" & MOD(A1,12) & "/12"` (replace A1 with your target cell reference). For a more descriptive output, use `=QUOTIENT(A1,12) & " dozen and " & MOD(A1,12) & " units"`.
Press Enter to generate the formatted text string showing your dozens and remainder.
Click and drag the fill handle at the bottom right of your calculated cell down to apply this formula to the remaining numbers in your list.

Automate the Conversion Using a VBA Worksheet_Change Event
If you absolutely cannot use a helper column, you can utilize a VBA macro to instantly intercept the number you type and convert it into a dozen format within the same cell.
Easily Calculate and Format Data with WPS Spreadsheet
WPS Spreadsheet fully supports advanced mathematical functions like QUOTIENT and MOD, as well as VBA macros. You can effortlessly manage inventory, calculate dozens, and customize data layouts all within a familiar, high-performance interface.
- 1. Open your data: Launch WPS Spreadsheet and open your inventory or data file.
- 2. Select your target cell: Click on a blank cell where you want the dozens calculation to appear.
- 3. Apply the formula: Type `=QUOTIENT(A1,12) & " Dozen " & MOD(A1,12)` and press Enter to instantly convert your values.

Frequently Asked Questions
Why can Excel format dates natively without a formula, but not dozens?
Dates in Excel are simply stored as sequential serial numbers, and the application's internal calendar engine is pre-programmed to map these serial numbers to specific visual calendar displays (like Nov-2021). Converting base units to dozens, however, requires division and remainder calculations. Custom number formatting is strictly for display masks and is not programmed to execute distinct mathematical operations.
Will applying a VBA conversion affect my ability to sum the dozens later?
Yes. When a VBA Worksheet_Change event replaces the raw base number (like 128) with a formatted string (like '10-8/12'), the underlying value of the cell becomes text. Because Excel's SUM function ignores text strings, you will not be able to tally or mathematically manipulate that column directly.
Is there a way to display dozens as a fraction without converting the value to text?
Yes. If you divide your base number by 12 using a formula (e.g., `=A1/12`), you can then apply the custom number format `# ??/12` to the result cell. This forces the display to show as a fraction over 12 (for example, 10 8/12). Because it remains a functional number, you can still use it for future mathematical calculations.




