*
PrecisionCalc*
Precision

xl

Get Your Numbers Right

Format Negative Numbers

with Red Font

Normally, Excel allows you to format negative numbers with a red font:

However, that doesn't work with xlPrecision numbers, because Excel doesn't
recognize them as numbers (and you wouldn't want it to, because then Excel
would reduce the precision to 15 significant digits). But you can still get xlPrecision negative
numbers to display with a red font, using Excel's Conditional Formatting
feature.

It's easiest if you format xlPrecision negative numbers with __
parentheses__ and you're using __Excel 2007__ or later:

- Select the range of cells.
- Select: Home tab | Styles section | Conditional
Formatting | New Rule
- Select rule type: Format only cells that contain
- Edit the rule description: Specific Text |
beginning with | (
*In the edit box, just type in an open parenthesis ("("), and nothing else.*

- Click Format, change font color to red, and click OK.
- Click OK.

If you format negative xlPrecision numbers with a leading hyphen ("-"), or if you're using Excel 2003 or earlier, you can still format negative xlPrecision numbers with a red font, but it's a bit trickier:

- Select the range of cells.
- Select: Formula Is
- Enter the formula:
__Important note__: the cell reference in the formula below must refer to the__active cell__in the selected range. So if you've selected column A, and cell A1 is the active cell, then the formula must refer to cell A1; then your conditional formatting rule will work for the entire selection, such as all of column A:- =LEFT(A1,1)="-"
*In the formula above, be sure to*__replace "____A1____"__with whatever cell is currently the active cell in the selected range.

- Click Format, change font color to red, and click OK.
- Click OK.
- To get a red font for both parentheses and leading hyphens, you'll need two rules. To get the second rule in Excel 2007 and later, select Home tab | Styles section | Conditional Formatting | New Rule a second time and repeat the steps for the second rule.

In Excel 2003 and earlier:

To get two rules In Excel 2003 and earlier, click Add to get "Condition 2" and
repeat the steps for Condition 2: