blank = no formating, <95% Red, >95% Green

G

Go Bucks!!!

I need to conditionally format cells based on their value. These values are
in percent. I want the following conditional formating rules:

blank = no formating, <95% Red, >95% Green

Thanks,
 
J

Jacob Skaria

1. Select the range. Suppose it is column F. The cell which is referenced in
the formula is the active cell in the selection. Active cell will have the
white background even after selection.

2. From menu Format>Conditional Formatting>

3. For Condition1>Select 'Formula Is' and enter the below formula
=AND(F1<>"",F1<0.95)
Click Format Button>Pattern and select your color (say Red)

4. Click on Add button.

5. For Condition2>Select 'Formula Is' and enter the below formula
=F1>=0.95)

Click Format Button>Pattern and select your color (say Green)

6. Hit OK

If this post helps click Yes
 
J

Jim Thomlinson

Another option to jacobs post is if you are only trying to format the text
colour then you could use a custom format as such...

Format -> Cells... -> Number -> Custom
[Green][>=0.95] 0.0%;[Red][<0.95] 0.0%;General
 
J

Jim Thomlinson

Sorry Jacob. I did not capitalize your name... Purely unintentional I assure
you.
--
HTH...

Jim Thomlinson


Jim Thomlinson said:
Another option to jacobs post is if you are only trying to format the text
colour then you could use a custom format as such...

Format -> Cells... -> Number -> Custom
[Green][>=0.95] 0.0%;[Red][<0.95] 0.0%;General
--
HTH...

Jim Thomlinson


Jacob Skaria said:
1. Select the range. Suppose it is column F. The cell which is referenced in
the formula is the active cell in the selection. Active cell will have the
white background even after selection.

2. From menu Format>Conditional Formatting>

3. For Condition1>Select 'Formula Is' and enter the below formula
=AND(F1<>"",F1<0.95)
Click Format Button>Pattern and select your color (say Red)

4. Click on Add button.

5. For Condition2>Select 'Formula Is' and enter the below formula
=F1>=0.95)

Click Format Button>Pattern and select your color (say Green)

6. Hit OK

If this post helps click Yes
 
G

Go Bucks!!!

Good morning Jacob,

The result was that all cells turned green (including blanks and values
below 95%). I am applying the condition to a selection, so the formula
currently looks like this...


=($I$2:$I$82>=0.95)
Formating is Green

=AND($I$2:$I$82<>"",$I$2:$I$82<0.95)
Formatting is Red
 
J

Jim Thomlinson

The CF need to be specific to each cell. To that end you do not want absolute
referencing.

Highlight Cells I2:I82 (with I2 as the active cell)
Add this formula for the CF
=AND(I2<>"",I2>=0.95)
Green

Do the same for Red.
This is a relative referenced function so that it will be correctly
referenced for each cell in the range selected.
 
J

Jacob Skaria

Conditional formula sets the formula to all cells in the selection
automatically. You dont need to refer that in your formula. Just select the
cells say I2:I82 and enter these formulas in CF conditions

=AND(I2<>"",I2<0.95)
Formatting is Red

=(I2>=0.95)
Formating is Green

If this post helps click Yes
 
G

Go Bucks!!!

Its working, but blank cells are green. Do I need to make a third condition
with
=""

?
 
J

Jacob Skaria

You dont need a third condition...

Just the formula
=I2>0.95
is enough

OR
=AND(I2<>"",I2>=0.95)


If this post helps click Yes
 
G

Go Bucks!!!

The second formula, =AND(I2<>"",I2>=0.95) worked.

If not, the blank cells turned green.

Thank you,

Steve
 
G

Go Bucks!!!

One more followup. I was hoping to apply these conditions only to selected
cells. I did so using a filter on Column I. But I see that the conditions
were applied to all the cells in column I. My criteria will be different
based on the customer noted in Column E.

e.g.

Customer A, >95
Customer B, >85
Customer C, >90

Thanks,
 
G

Go Bucks!!!

I got my answer.

The formula is...

=OR(AND(I2<>"",E2=$K$5,I2>=$O$5),AND(I2<>"",E2=$K$6,I2>=$O$6),AND(I2<>"",E2=$K$7,I2>=$O$7),AND(I2<>"",E2=$K$8,I2>=$O$8),AND(I2<>"",E2=$K$9,I2>=$O$9),AND(I2<>"",E2=$K$10,I2>=$O$10))

where: I has the data, E has the company name, and K and O are the company
and performance target criteria.

works great. I put the I2<>"" into all formulas to keep from getting the
green in blank cells.

Thanks all!
 

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