Coloured backgrounds using IF

S

Simon

Hi I am looking to format teh colour of cells using their values

ie
equal to or less than 5 Green
6 to 14 yellow
15 and greater red

any help greatly appreciated.
 
P

Pete_UK

You would use Conditional Formatting to do this - available on the
Format menu. Just follow the Wizard through and choose the Patterns
tab for background colour.

Hope this helps.

Pete
 
J

JudithJubilee

Hi Simon,

Highlight the cells and choose Format + COnditional Formating
Press the Add button twice - this will give you three lines.
1 - Change Between to Less than or Equal to, type 5 - Click Format and
choose Green
2 - Type 6 and 14 - Click Format and choose Yellow
3 - Change between to Greater or Eqaul to, typr 15 - Click Fornat and choose
Red

Judith
 
M

Ms-Exl-Learner

Assume that you are having Values in A column like the below:-

A Col
4
5
2
6
6
3
15
14
13
12
8
5
88

Place the cursor in A1 cell and extend the selection by holding the shift
and down arrow upto your desired cell, keep in mind that the active cell
should be A1 (Active cell will have a white background after selection also)

now goto format>>conditional formatting>>Condition 1>Formula is>>paste the
below formula
=AND($A1<=5,$A1<>"")
Click Format>>Pattern>Colour>Green and give ok.

Then Click Add>>Condition 2>> Formula is>>paste the below formula
=AND($A1>=6,$A1<=14)
Click Format>>Pattern>Colour>Yellow and give ok.

Then Click Add>>Condition 3>> Formula is>>paste the below formula
=$A1>=15
Click Format>>Pattern>Colour>Red and give ok.

That's it!

Remember to Click Yes, if this post helps!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top