Accounting Dash-for-Zero Normalizer
Replace cells consisting of a trimmed ASCII accounting dash with the exact string 0, preserving all other cell text including numeric signs and Unicode dashes.
Description
Accounting displays may use a solitary dash to represent zero.
Accounting displays may use a solitary dash to represent zero. That convention should be applied narrowly, because a minus sign within a numeric token and a Unicode dash can have different meanings.1
Replace cells consisting of a trimmed ASCII accounting dash with the exact string 0, preserving all other cell text including numeric signs and Unicode dashes.
When to use Accounting Dash-for-Zero Normalizer
Use this tool to replace cells consisting of a trimmed ASCII accounting dash with the exact string 0, preserving all other cell text including numeric signs and Unicode dashes.
Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.
How to use Accounting Dash-for-Zero Normalizer and understand its results
- Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.
- Enter values using the field table and calculation rules, then run the tool.
- Read values. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| values | Values | list of string; maximum length: 10000; minimum entries: 0; maximum entries: 10000 | Required |
Supply decoded cell strings. The tool trims each cell only for comparison and replaces it with the exact string 0 when the trimmed content is one ASCII hyphen-minus. Every other original string is preserved, including its whitespace, signs and Unicode characters. The output list retains input order.
normalized cell = '0' if trim(cell) equals ASCII '-', otherwise original cell Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| values | Values | list of string |
{
"input": {
"values": [
" - ",
"-12",
"—",
""
]
},
"output": {
"values": [
"0",
"-12",
"—",
""
]
}
} Limitations and assumptions
This does not infer an accounting format, parse amounts or treat blank cells as zero. En/em dashes and negative numbers are unchanged. The returned zeros are strings; convert them later only under the intended column-type policy.
Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Cell-string lists also have a combined text budget of 100,000 UTF-16 units per list. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.
Alternative or Complementary methods
Use Negative Parentheses Accounting Parser: Convert one parenthesized unsigned accounting decimal with optional boundary currency symbol into an exact negative decimal, using explicit decimal and grouping separators. For a complementary task, use Boolean Token Normalizer: Normalize trimmed case-insensitive yes/no, true/false, and 1/0 column cells into booleans, returning a cell-specific error for unknown tokens.
References
-
Accounting Dash-for-Zero Normalizer — tool.io
Similar or alternative tools
- Negative Parentheses Accounting Parser
Convert one parenthesized unsigned accounting decimal with optional boundary currency symbol into an exact negative decimal, using explicit decimal and grouping separators.
- Boolean Token Normalizer
Normalize trimmed case-insensitive yes/no, true/false, and 1/0 column cells into booleans, returning a cell-specific error for unknown tokens.