Format Negative Numbers in Red with Brackets in Calc
This guide explains how to format negative values in LibreOffice Calc so they appear in red text and are enclosed within custom brackets. By utilizing custom number format codes, you can enhance the readability of your financial sheets, budgets, and data reports without altering the underlying numerical values.
Step-by-Step Instructions
Select the Target Cells
Highlight the cells, rows, or columns containing the numbers you want to format.Open the Format Cells Menu
Right-click the selected area and choose Format Cells… from the context menu (or pressCtrl + 1/Cmd + 1on macOS).Navigate to Numbers Settings
In the Format Cells dialog box, select the Numbers tab.Select the User-defined Category
In the Category list on the left, click User-defined.Enter the Custom Format Code
In the Format code input field at the bottom of the dialog, enter your desired structure. Calc uses the syntaxPositive;Negative;Zero.For standard accounting parentheses:
#,##0.00;[RED](#,##0.00)For square brackets:
#,##0.00;[RED]"["#,##0.00"]"For curly braces:
#,##0.00;[RED]"{"#,##0.00"}"For integer-only display (no decimals):
#,##0;[RED](#,##0)
Save and Apply
Click the OK button.
Format Code Breakdown
[RED]: The color modifier that instructs Calc to render the negative value in red font.#,##0.00: The standard number pattern defining thousands separators and two decimal places.;(Semicolon): Separates the rule for positive numbers from the rule for negative numbers.- Quotes
"": Required around special characters like literal square brackets[]or curly braces{}so Calc does not confuse them with internal formatting commands. Standard parentheses()work without quotation marks.