19

I'm trying to control the display of Excel cells using the customized format.

For example

#,##0;(#,##0)

will shows positive numbers as usual, but negative numbers with brackets instead of with a - sign.

Where can I find the introduction of the syntax? For example, I don't know how to make negative numbers to show as red. Also, I'm not sure how to specify the precision.

1

2 Answers 2

20

Try this Microsoft article "Review guidelines for customizing a number format"

A number format can have up to four sections of code, separated by semicolons. These code sections define the format for positive numbers, negative numbers, zero values, and text, in that order.

   <POSITIVE>;<NEGATIVE>;<ZERO>;<TEXT>

For example, you can use these code sections to create the following custom format:

   [Blue]#,##0.00_);[Red](#,##0.00);0.00;"sales "@
1
  • Who felt the need to downvote this? Can you please leave a comment with your reasoning?
    – teylyn
    Dec 23, 2018 at 21:37
4

You can use these Custom formats to put Negative Numbers in Red color, inside Brackets with Minus Sign, and Positive Numbers without Brackets and any Sign in Black Color, (which can be Blue or Even Green also).

[Black]#,##0.00_);[Red](-#,##0.00);0.00

#,##0.00_);[Red](-#,##0.00)

For example:

enter image description here

99,000.00

enter image description here

This Custom Format will show Negative Number with Minus Sing in Black Color without Brackets.

#,##0.00_) -99,000.00

For more details you can check these Web Sites:

https://exceljet.net/custom-number-formats

https://www.ablebits.com/office-addins-blog/2016/07/07/custom-excel-number-format/

Note, Color codes [Black] & [Red] are editable and should like, [Blue] or [Green].

1
  • Write you concern, Why down voted this post? Dec 23, 2018 at 6:00

Not the answer you're looking for? Browse other questions tagged .