# Automatic cell coloring in Excel?

**URL:** <https://boards.straightdope.com/t/automatic-cell-coloring-in-excel/417649>\
**Category:** Factual Questions\
**Created:** [August 31, 2007, 6:44pm UTC](https://boards.straightdope.com/t/automatic-cell-coloring-in-excel/417649 "2007-08-31T18:44:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Whack-a-Mole](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/whack-a-mole/32/141_2.png) [@Whack-a-Mole](https://boards.straightdope.com/u/Whack-a-Mole)\
**Post date:** [August 31, 2007, 6:44pm UTC](https://boards.straightdope.com/t/automatic-cell-coloring-in-excel/417649/1 "2007-08-31T18:44:51Z")

</div>

This may be stretching Excel capabilities (moving into some minor programming) but thought I’d ask.

I’d like Excel to auto-fill a cell background color based on some criteria I set.

For instance if the number in cell A1 is 10% or more than cell B1 I want it colored green. If it is 0-10% colored yellow. If less than 0% colored red.

Can this be done easily?

---

<div class="post-metadata">

**Author:** ![minor7flat5](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/minor7flat5/32/258_2.png) [@minor7flat5](https://boards.straightdope.com/u/minor7flat5)\
**Post date:** [August 31, 2007, 6:49pm UTC](https://boards.straightdope.com/t/automatic-cell-coloring-in-excel/417649/2 "2007-08-31T18:49:12Z")

</div>

Easy as pie.

I’m on a Mac, so I am not sure if the menu is the same, but all I need to do is go to Format -\> Conditional Formatting…

Then you get to pick some criteria such as “\<10%” and the formatting (e.g. red background) you wish to apply.

I believe they give you up to three different ones that you can apply for the same cells. Anything more than that and you’ll probably be programming VBA.

---

<div class="post-metadata">

**Author:** ![Q.E.D](https://avatars.discourse-cdn.com/v4/letter/q/51bf81/32.png) [@Q.E.D](https://boards.straightdope.com/u/Q.E.D)\
**Post date:** [August 31, 2007, 6:49pm UTC](https://boards.straightdope.com/t/automatic-cell-coloring-in-excel/417649/3 "2007-08-31T18:49:30Z")

</div>

In the Format menu, select Contitional Formatting. It should be clear what you need to do at that point.

---

<div class="post-metadata">

**Author:** ![Whack-a-Mole](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/whack-a-mole/32/141_2.png) [@Whack-a-Mole](https://boards.straightdope.com/u/Whack-a-Mole)\
**Post date:** [August 31, 2007, 6:57pm UTC](https://boards.straightdope.com/t/automatic-cell-coloring-in-excel/417649/4 "2007-08-31T18:57:52Z")

</div>

Awesome. Thanks you two!
