How to Add Brackets to Negative Numbers in Excel (3 Easy Ways)

We will use the following dataset which displays the buying price and selling price of some products.

Method 1 â€“ Changing Cell Format to Add Brackets to Negative Numbers

Steps:

• We will calculate the expected profit or loss from our data set.
• Enter the following formula into cell D5:
`=B5-C5`

• Press Enter to see the result.
• Use the AutoFill feature to drag the formula for the lower cells of the same column.

• You will notice negative numbers in the data set after calculation.
• We will add brackets to these numbers.
• Select all the numbers from cell range D5:D10.

• Right-click on the mouse after selecting the cell range.
• Select the Format Cellsâ€¦ command.

• You will see the Format Cells dialogue box.
• Go to the Number tab of the box.
• Choose the Number option.

• Choose the command (1234.10), which is in black.
• Press OK.

• You will see all the negative numbers in column D are in brackets and black.

• If you want to change the color of the negative numbers with brackets, go to the Number options from the Format Cells dialogue box.
• Choose the command (1234.10)Â in red.
• Press OK.

• You will see all the negative numbers in brackets, and they are red.

Method 2 â€“ Customizing Format Cells Box to Add Brackets to Negative Numbers

Steps:

• Select the cell range where you want to add brackets. Here, the cell range is D5:D10.
• Go to the Home tab.
• In the Number group, choose the little arrow on the lower-right side of the group.

• You will see the Format Cells dialogue box.
• Go to the Custom tab from the box.

• From the tab, choose the command #,##0.00_);(#,##0.00).
• Press OK.

• This command will add brackets to the negative numbers in the dataset. They will be black.

• If you want your bracketed negative numbers in red color, choose the #,##0.00_);[Red](#,##0.00) command from the Format Cells dialogue box.
• Press OK.

• This command will show all the negative numbers in red with brackets.

Method 3 â€“ Applying VBA to Add Brackets to Negative Numbers

Steps:

• Go to the Developer tab of the ribbon.
• Choose the Visual Basic command from the Code group of the tab.

• You will see the VBA window after selecting the command.
• From the Insert tab, choose Module.

• Enter the following VBA code in the module:
``````'Set the Function Name
'Select the Cell range where the negative numbers are
Range("D5:D10").Select
'Set the format of the cells after adding brackets
Selection.NumberFormat = "0.00_);[Red](0.00)"
End Sub``````

Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  VBA Breakdown

• The function name is Add_Brackets_to_Negative_Numbers.
• Range(“D5:D10”). Select: Select the cell range where the negative numbers are located.
• Selection.NumberFormat = “0.00_);[Red](0.00)”: Add brackets to negative numbers and set their font color as red.
• Save the code and press the play button or F5 to run the code.

• You will see all the negative numbers in brackets after running the code.

You can download the free Excel workbook here.

Related Articles

<< Go Back to Negative Numbers in Excel | Number Format | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Md. Araf Bin Jayed

I am Araf. I have completed my B.Sc in Industrial and Production Engineering from Ahsanullah University of Science and Technology. Currently I am working as an Excel & VBA Content Developer in Softeko. With proper guideline and aid of Softeko I want to be a flexible data analyst. With my acquired knowledge and hard work, I want to contribute to the overall growth of this organization.

We will be happy to hear your thoughts

Advanced Excel Exercises with Solutions PDF