# Excel Formatting

**URL:** <https://boards.straightdope.com/t/excel-formatting/979444>\
**Category:** Factual Questions\
**Created:** [February 7, 2023, 7:19pm UTC](https://boards.straightdope.com/t/excel-formatting/979444 "2023-02-07T19:19:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![OldOlds](https://avatars.discourse-cdn.com/v4/letter/o/a3d4f5/32.png) [@OldOlds](https://boards.straightdope.com/u/OldOlds)\
**Post date:** [February 7, 2023, 7:19pm UTC](https://boards.straightdope.com/t/excel-formatting/979444/1 "2023-02-07T19:19:51Z")

</div>

I hope this question isn’t beneath the Teeming Millions…

I have a financial spreadsheet I’ve created in Excel. In one column of calculations, I’d like it to automatically make any positive number green, any negative number red and in parenthesis [ie ($200) but text is red] and any zero as black.

Is this doable in any reasonably simple way?

---

<div class="post-metadata">

**Author:** ![Schnitte](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/schnitte/32/9033_2.png) [@Schnitte](https://boards.straightdope.com/u/Schnitte)\
**Post date:** [February 7, 2023, 7:28pm UTC](https://boards.straightdope.com/t/excel-formatting/979444/2 "2023-02-07T19:28:36Z")

</div>

Easily doable, the term to search for is conditional formatting. [Here](https://support.microsoft.com/en-us/office/highlight-patterns-and-trends-with-conditional-formatting-eea152f5-2a7d-4c1a-a2da-c5f893adb621) is a guide from the Microsoft website.

---

<div class="post-metadata">

**Author:** ![YamatoTwinkie](https://avatars.discourse-cdn.com/v4/letter/y/cc9497/32.png) [@YamatoTwinkie](https://boards.straightdope.com/u/YamatoTwinkie)\
**Post date:** [February 7, 2023, 7:35pm UTC](https://boards.straightdope.com/t/excel-formatting/979444/3 "2023-02-07T19:35:43Z")

</div>

To get the “parenthesis / red” for negative numbers, highlight the cells in Excel, right click and select “Format cells”, select currency and pick the option for how you want to display negative numbers.

To get the green format for positive numbers, highlight all the cells again and select “conditional formatting” and select “highlight cell rules” → “Greater Than…”, then ensure all values greater than zero are displayed with a custom format (green font color).

---

<div class="post-metadata">

**Author:** ![OldOlds](https://avatars.discourse-cdn.com/v4/letter/o/a3d4f5/32.png) [@OldOlds](https://boards.straightdope.com/u/OldOlds)\
**Post date:** [February 7, 2023, 7:37pm UTC](https://boards.straightdope.com/t/excel-formatting/979444/4 "2023-02-07T19:37:28Z")

</div>

Thanks both. There was a time, back in the late 90s when I thought I was pretty good with Excel. I don’t use it nearly as much as I used to, and it’s slowly evolved to where I didn’t even see that obvious conditional formatting button.

I used to be with it, then they changed what it is, and now it seem strange and scary to me.

---

<div class="post-metadata">

**Author:** ![LSLGuy](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lslguy/32/5813_2.png) [@LSLGuy](https://boards.straightdope.com/u/LSLGuy)\
**Post date:** [February 7, 2023, 8:44pm UTC](https://boards.straightdope.com/t/excel-formatting/979444/5 "2023-02-07T20:44:29Z")

</div>

You don’t need conditional formatting for that. Conditional formatting can be made to work for your use case, but is unnecessarily complicated.

The **un** conditional formatting specifiers give you a way to specify different formatting and coloration for each of positive, negative, zero, and empty/text cells.

See here for the nitty gritty.

> **[Number format codes - Microsoft Support](https://support.microsoft.com/en-us/office/number-format-codes-5026bbd6-04bc-48cd-bf33-80f18b4eae68)**
>
> You can use the built-in number formats in Excel as is, or you can create your own custom number formats to change the appearance of numbers, dates, and times.

Something real close to this should achieve your goal:

> [green]\_($\* #,##0.00\_);[red]\_($\* (#,##0.00);\_($\* “-”??_);_(@\_)

Note that I had to insert a bunch of backslashes in my text to make discourse not try to reformat this according to its rules for showing fancy math symbols. So you want to copy what you can see here, not what you’d see if you quote my post.

You can also experiment by inputting some example numbers into some junk cells, choosing “format cells” from the menu, then under the number or accounting or currency formatting categories, fiddling with the various checkboxes and settings and see what format string the various choices generate. Once you understand that, you can generalize from there to achieve your specific goals that exceed what their sorta-wizard interface can generate.

---

<div class="post-metadata">

**Author:** ![md-2000](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@md-2000](https://boards.straightdope.com/u/md-2000)\
**Post date:** [February 7, 2023, 9:37pm UTC](https://boards.straightdope.com/t/excel-formatting/979444/6 "2023-02-07T21:37:39Z")

</div>

> [@YamatoTwinkie](#):
>
> To get the “parenthesis / red” for negative numbers, highlight the cells in Excel, right click and select “Format cells”, select currency and pick the option for how you want to display negative numbers.
> 
> To get the green format for positive numbers, highlight all the cells again and select “conditional formatting” and select “highlight cell rules” → “Greater Than…”, then ensure all values greater than zero are displayed with a custom format (green font color).

And I was playing with this (thanks) and if it’s not obvious: apply the conditional format rule twice on the same cell(s), once for “if less than” and zero (for red), and again for “if greater than” and zero (green). Then the paintbrush “Copy Format” will apply those rules to any other cells you choose.
