To display numbers in dark green with an Excel custom number format, select the cells, press Ctrl+1, choose Number > Custom, and enter [Color10]#,##0.00;[Color10](#,##0.00);[Color10]0.00;[Color10]@. The format colors positive values, negative values, zeroes, and text dark green; the displayed color can vary slightly with Excel’s color palette and the workbook’s appearance.
What the dark-green code means
In a custom number format, the bracketed color instruction tells Excel what font color to use for values displayed by that section of the format. The classic indexed color code [Color10] is the dark-green choice. It is different from typing the word [Green], which selects the named green color and may look brighter than the dark green you want.
The rest of the example controls how the value appears, not what is stored in the cell. #,##0.00 displays a thousands separator and two decimal places. Parentheses in the negative section display negative values in parentheses, and @ is the placeholder that displays text. The semicolons divide the format into sections: positive numbers; negative numbers; zero; and text.
If you only need a basic display, a shorter format such as [Color10]#,##0.00 can be sufficient. It does not give each type of value its own display rule, however. The four-section version makes the color instruction explicit for every type and gives you a separate place to customize negatives, zeroes, and text.
Apply the format in Excel for Microsoft 365 on Windows
- Select the cells or range you want to format. You can select an entire column if new entries in that column should use the same format.
- Press Ctrl+1 to open the Format Cells dialog box. Alternatively, use Home > Number and open the Number Format dialog launcher.
- Choose the Number tab, then select Custom in the Category list.
- Click the Type box, replace its contents with the format code, and select OK.
On a Mac, select the cells and press Command+1 to open Format Cells; then choose Number and Custom and enter the code. Keyboard behavior can depend on the keyboard and system settings, so the Format Cells command in Excel’s menus is an alternative. In Excel for the web, an existing custom format may be displayed, but if the interface does not offer the Custom type for creating or editing a code, open the workbook in the desktop app.
Choose how positive, negative, and zero values appear
A number format can have as many as four sections, separated by semicolons. Their usual order is positive values, negative values, zero, and text. You do not have to define all four sections, but leaving a section out can mean Excel uses a default display for that value type. Add a color instruction to each section when the goal is to keep all displayed numbers dark green.
[Color10]#,##0.00displays positive numbers with two decimal places and grouping commas.[Color10](#,##0.00)displays negative numbers in parentheses while retaining dark green.[Color10]0.00displays a zero as 0.00 in dark green.[Color10]@displays text in the fourth section using the specified color.
For a financial report where negative values should stand out in red, one possible code is [Color10]#,##0.00;[Red](#,##0.00);[Color10]0.00;[Color10]@. This deliberately makes only positive values and zeroes dark green; negative numbers are red. If you prefer negatives to remain dark green, use [Color10] in the second section as in the opening example. Choose the convention that readers of the workbook will understand.
Number formatting changes appearance, not the value
A custom number format is a display instruction. If a cell contains the numeric value 1250, applying [Color10]#,##0.00 makes it appear as 1,250.00 in dark green, but the underlying value remains 1250. Formulas that refer to the cell continue to use the number, not its formatted appearance. You can confirm this by selecting the cell and looking at the formula bar.
This is why number formatting is usually preferable to changing a number into text just to give it a colored appearance. A text conversion can interfere with sorting, arithmetic, charts, and other calculations. Keep the value numeric and use formatting when the change is purely visual. If a downstream system requires a particular text representation, that is a separate requirement and should be handled deliberately.
Custom number format color versus font color
Both a custom number format and the Font Color control can make cell contents appear green, but they serve different purposes. A custom format attaches color to the way the cell’s values are displayed. Setting font color through Home > Font Color applies a font-formatting choice directly to the selected cells. Either method can be useful; the custom format keeps the color instruction alongside the number-display rules.
Custom number format color codes use Excel’s supported named colors or indexed colors. They do not provide a direct place to enter an arbitrary RGB or hexadecimal color value. If your organization specifies a precise brand shade, use the Font Color palette’s custom color options where available, or use a cell style or conditional formatting that supports the desired color. The choice between a fixed shade and the indexed dark green depends on whether exact color matching matters.
Also note that a format controls the font color, not the cell’s fill color. To shade the background, use the Fill Color control or an appropriate conditional-formatting rule. Applying a dark-green font to a dark fill can reduce readability, so check contrast before using the combination in a report.
When conditional formatting is a better choice
A custom number format is appropriate when the color should stay the same regardless of the value. For example, you might format a column of confirmed revenue figures in dark green to match a consistent report design. If the color should change according to a rule—green for values above a target, red for values below it—use conditional formatting instead.
On Windows, select the range and go to Home > Conditional Formatting > New Rule. Choose a rule type, set the condition, select Format, and choose a font color. For a simple threshold, the Highlight Cells Rules options may be quicker. On Mac, the Conditional Formatting commands are on the Home tab as well, though dialog layouts can differ. Conditional formatting can update as cell values change, while a fixed custom format does not make decisions based on a threshold.
When both methods affect font color, conditional formatting can take precedence for the formatting property controlled by its rule. If the visible color does not match the custom format, inspect the cell’s conditional-formatting rules as well as its number format. This is a common reason a correctly entered [Color10] code appears to have no effect.
Common problems and how to fix them
- The code appears in the cell instead of formatting the value. Reopen Format Cells and make sure you entered the code under Number > Custom, rather than typing it into the worksheet cell itself.
- The text is green but numbers are not. Check that each relevant number section begins with
[Color10]. A color instruction in the fourth, text section alone does not color numeric values. - The shade looks too bright or different from another workbook. Excel’s indexed color system can produce a shade that differs from a chosen theme color or a custom RGB shade. Check the displayed result, and use a direct font-color choice if exact matching is important.
- Only some values change color. Review all four sections and inspect conditional formatting. Also check whether the selected range included every cell that should receive the custom format.
- A date or percentage no longer looks right. The example is designed for ordinary decimal numbers. Preserve the required display pattern—for example, a percentage pattern or a date pattern—and add the color instruction to its sections rather than replacing it with a decimal format.
Custom formats are stored with the workbook and can be reused through the Type list after they have been applied. If a code is important to a shared report, document what its sections mean; otherwise, a later editor may see an unfamiliar format and replace it with a standard one.
Frequently Asked Questions
What is the Excel custom format code for dark green?
Use [Color10] as the color instruction. For example, [Color10]#,##0.00 displays a number with two decimal places in the indexed dark-green color.
Does [Green] mean dark green in Excel?
Not necessarily. [Green] uses Excel’s named green color, which may appear brighter than dark green. Try [Color10] for the classic indexed dark green and check the workbook’s actual display.
Can I enter a hex color in a custom number format?
No. Custom number-format color instructions use supported color names or indexed values, not a direct hex or RGB entry. Use the font-color controls or a suitable conditional-formatting rule when you need a particular custom shade.
Will the dark-green format change my numbers or formulas?
No. It changes how the cell contents are displayed, not the stored numeric value. Calculations continue to use the underlying number.
Why is my number still a different color?
Check that the code is in the correct number-format sections and that the cells are selected. Then review conditional formatting, which may apply another font color and override the custom format’s appearance.
Can I make only positive numbers dark green?
Yes. Use a green instruction in the positive section and choose another instruction for negatives, such as [Color10]#,##0.00;[Red](#,##0.00);0.00;@. The sections are separated by semicolons, so you can set each value type’s display independently.
Related
- Copy Paste in Excel: Keep Column Widths When Pasting
- Copy an Entire Excel Spreadsheet to a New File
- Copy and Paste X Times in Excel: Repeat Cells or Rows
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Column to Colon-Separated Text in a Single CellTo combine a column into one colon-separated text string in Excel for Microsoft 365, enter =TEXTJOIN(":",TRUE,A2:A6) in a…
- CSV Import Wizard in Excel: How to Import FilesTo import a CSV file into Excel for Microsoft 365 on Windows, choose Data > From Text/CSV, select…
- Excel Keyboard Shortcut to Select a Row in Any WorksheetIn Excel for Microsoft 365 on Windows, press Shift+Space to select the entire worksheet row containing the active…
- Google Sheets: What It Is, How It Works, and When to Use ItGoogle Sheets is Google’s spreadsheet application for creating, editing, and sharing spreadsheets in a web browser. It lets…
- Find Circular References in ExcelTo find a circular reference in Excel for Microsoft 365 on Windows, open Formulas > Error Checking >…
- Goal Seek for Multiple Cells in Excel: What You Can DoExcel’s Goal Seek can change only one input cell in a single run, so it cannot directly adjust…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.