Sub topic 13
Currency and Accounting Formats
Currency and Accounting both show a number as money. They differ in where the symbol sits, how negatives look, and how zero is shown. This chapter covers how each one works, how to read the Accounting format code, and how to pick a currency symbol for a specific locale.
It assumes you can already apply formats with Format Cells and write custom codes with digit placeholders and sections. It also assumes you know that formatting changes how a value looks and not what is stored.
Neither format is a data type
Excel has no money type. Both formats are number formats applied to an ordinary number. If A1 holds 1234.5 and you apply Currency, the cell shows $1,234.50 and still stores 1234.5. Formulas that refer to A1 see 1234.5.
Two consequences follow:
- Changing the symbol from $ to € does not convert the amount. A cell showing $100.00 shows €100.00 after the change, with the same stored 100.
- Typing a value such as $5 into a cell often makes Excel store 5 and apply a Currency format for you. The symbol is formatting, not part of the value.
Currency format
Currency puts the symbol directly in front of the first digit. It has three settings:
- The number of decimal places.
- The symbol.
- The way negative numbers appear. The choices are a leading minus sign, red text, parentheses, or red text with parentheses.
Because the symbol sits next to the digits, a column of different-sized amounts has symbols at different horizontal positions. Right-aligned numbers line up at the right edge, but the symbols do not line up.
On Windows, Ctrl+Shift+4 applies Currency with two decimals and your system's default symbol. You can also use Home > Number group > the number format dropdown, or Format Cells > Number > Currency.
Accounting format
Accounting is built for columns. It does these things:
- It pins the symbol to the left edge of the cell and the number to the right edge.
- It lines up the decimal points, including a small space on the right where a negative number's closing parenthesis would go.
- It shows negatives in parentheses.
- It shows zero as a dash.
You choose the decimal places and the symbol. You cannot choose a different negative style from the dialog. Horizontal alignment settings have little effect, because the format controls placement.
The Accounting button in the Home tab's Number group applies the format. Its dropdown lists common symbols, such as $ English (United States), € Euro (€ 123) and £ English (United Kingdom).
| Feature | Currency | Accounting |
|---|---|---|
| Symbol position | Next to the first digit | Left edge of the cell |
| Negative display | Choice of minus, red, parentheses | Parentheses only |
| Zero | Shows 0.00 | Shows a dash |
| Decimal alignment | Only if all values have the same width | Always aligned |
| Best for | Single values, summaries, invoices | Ledgers and columns of figures |
Reading the Accounting format code
Select a cell with Accounting applied, open Format Cells > Custom, and you will see the code for US dollars:
_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)It has four sections separated by semicolons, in this order: positive, negative, zero, text. Three special characters do the work:
_(means "leave a blank the width of the ( character." It gives the left margin that makes positive and negative numbers line up.*followed by a space means "repeat a space to fill the rest of the cell width." This pushes everything after it to the right edge, and it is why the symbol sits at the left._)leaves a blank the width of the closing parenthesis. A positive number gets this blank so it lines up with a negative one that ends in).
The zero section, _($* "-"??_), prints a literal dash. The two ? placeholders each reserve the width of a digit without printing zeros, so the dash sits roughly under the decimal point. The text section, _(@_), shows typed text with the same margins.
Building your own money formats
A currency symbol in a custom code is just literal text. This works for common symbols such as $, £, ¥ and €, which Excel accepts without quotes:
$#,##0.00;[Red]($#,##0.00);"-"This is a three-section code: positive, negative in red with parentheses, and zero as a dash. You can move the symbol to the end by writing #,##0.00 €. Many European conventions put the symbol after the number.
Choosing a symbol for a locale
The symbol list in Format Cells contains entries such as "€ Euro (€ 123)" and "€ German (Germany)". When you pick a locale-specific entry, Excel stores a bracketed token in the code:
[$€-407] #,##0.00The pattern is [$symbol-locale code]. Here 407 is the hexadecimal Windows locale ID for German (Germany). The code ties the symbol to that locale, which matters when the same file is opened on computers with different regional settings. Without such a token, a plain $ or € simply displays what you typed.
Decimal and thousands separators in the display still follow the regional settings of the computer that opens the file. A workbook can show 1,234.50 on one computer and 1.234,50 on another, even though the stored value is the same. The next chapter covers this in detail.
Currency inside text
To put a money value in a label, use TEXT with a code that includes the symbol:
=TEXT(A1,"$#,##0.00")The result is text, not a number. Use it for display strings only. Do not use it in cells that other formulas will add up.
Choosing between the formats
Common problems
- Totals look wrong by a cent. The cells show two decimals but store more. Add the visible values by hand and you get a different total than SUM gives. If the displayed amounts must be the amounts, round the stored values:
=ROUND(A1,2)- The symbol does not line up in a Currency column. This is expected. Switch to Accounting.
- Negative numbers do not show in red under Accounting. Accounting has no red option. Write a custom code with
[Red]in the negative section. - A pasted amount does not respond to formatting. The cell holds text, not a number. Convert it first, as covered in the chapter on converting text to numbers.
- Cells show ####. The column is too narrow for the formatted result. Widen the column or reduce decimals.
Exercise
A column of invoice amounts is formatted as Currency with two decimals. The symbols sit at different positions and negative amounts do not line up with positive ones. Which format fixes this, and which character in its code creates the left-aligned symbol?
Show answer
Apply Accounting. In the code _($* #,##0.00_), the * followed by a space repeats a space to fill the cell, which pushes the number to the right edge and leaves the $ at the left. The _) padding keeps positive and negative numbers aligned.
Exercise
Write a custom format that shows positive numbers with a $ symbol and two decimals, negatives in red inside parentheses, and zero as a dash.
Show answer
$#,##0.00;[Red]($#,##0.00);"-"