Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add color to a cell 1

Status
Not open for further replies.

Tenspeed23

Technical User
May 15, 2004
6
US
I am using Excel SS to show percents in a column. If the cell in the column is 8% or more can I put a color in the cell showing this if the percent is 8% or more? I am using
the IF statement.
Thanks for any help
Max
 
Hi Tenspeed23,

You can't set cell colour using a formula in the cell. The way to do it is with Conditional Formatting (on the Format Menu).

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
 
Tony Thanks for your reply. Could you please give me
an example as I have tried using Conditional Formatting (on the Format Menu) with no sucess. Thanks
Max
 
Hi Max,

You may have made an error with the percentages (depending on how you are displaying them). A simple example ..

In cell A2 I put [blue]175[/blue]
In cell B2 I put [blue]14[/blue]

In cell C2 I put [blue]=B2/A2[/blue], and I formatted the cell as Percentage so it displayed as 8.00%

Next I applied conditional formatting to cell C2 ..

Select cell C2
Select Format > Conditional Formatting from the Menu
Under Condition 1, Select Cell Value Is: (the default)
In the dropdown to the right of the condition (which by default shows "Between") choose Greater Than
The two text boxes on the right will be replaced by a single one - in it, enter 0.08 (which is the actual value which is displayed as 8% in the cell)
Choose the formatting you want when the condition is met and then Press OK

When I did this, and then changed cell B2 to [blue]15[/blue], cell C2 change to show 8.57% in the condition format I had chosen.

If you are actually calculating the percentage yourself (using [blue]=B2/A2*100[/blue], perhaps), the value you need to put in the conditional format will have to be 8 instead of 0.08. If you are doing it some other way (which perhaps results in text rather than a number) please come back with details.

Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top