condition and color

E

eli

Hello,

Thanks for the help in advance :)

This is the scenario.
Cell A1 has a value, thats the objective to reach.
I then enter my result in cell B1, lets say the result is
90 (ie i do not reach the objective compared to 100)

How can i make the content of the cell B1 appear in green
each time the objective is met OR in red if the objective
is not met?

Thanks

Eli
 
D

Domenic

Hi Eli,

Use Conditional Formatting...

Format > Conditional Formatting

Condition 1 > Formula Is

=$B$1=$A$1 and choose your formatting

Click Add

Condition 2 > Formula Is

=$B$1<>$A$1 and choose your formatting

Click Ok

Hope this helps!
 
P

Peo Sjoblom

Select B1, do format>conditional formatting>select formula is and use

=AND(ISNUMBER(B1),A1=B1)

click format button and select green fonts (if you want the background in
the cell to be green select patterns and green)

click add>> and select formula is and

=AND(ISNUMBER(B1),A1>B1)

repeat and select red font

click OK twice

--
Regards,

Peo Sjoblom

(No private emails please, for everyone's
benefit keep the discussion in the newsgroup/forum)
 
M

Michael

Hi Eli
Try using Format / Conditional Format
In Condition 1 Use Formula is:, in the next box put >=A1
Now format the cell they you want it to appear.
When that is doen Click the add button and do the same
again for <A1 and format to suit.

Regards
Michael
 
M

Max

One way to set it via conditional formatting :

Select B1

Click Format > Conditional Formatting

Make the settings under Condition 1:
Formula Is | =AND(ISNUMBER($B$1),$B$1>=$A$1)
Click Format button > Patterns tab > Light green? > Ok

Click Add (this adds condition 2)

Make the settings under Condition 2:
Formula Is | =AND(ISNUMBER($B$1),$B$1<$A$1)
Click Format button > Patterns tab > Red? > Ok

Click OK at the main dialog

B1's fill color will be green or red depending
= the number in A1,
or < the number in A1

If B1 is blank or contains text (instead of numbers)
there'll be no conditional formatting activated,
i.e. the fill color of B1 will assume the default "no fill color"
(or whatever "original" fill color that you might have applied to B1)
 
E

eli

Hi again,

I tried with formula is, but the formatting does not work.
I tried it with cell values is, and it worked, except
that how can i create a condition ( a third one) where if
no value is put in the result cell, it appears "white".
WHat happens now if there is no values, it appears red,
since my 2nd format rule, says : <a1

Thanks
 
M

Max

Maybe you'll like to try the other 3 suggestions offered as well
- by Domenic, Peo and me ??
 
E

eli

It works now ! Thanks

Eli
-----Original Message-----
One way to set it via conditional formatting :

Select B1

Click Format > Conditional Formatting

Make the settings under Condition 1:
Formula Is | =AND(ISNUMBER($B$1),$B$1>=$A$1)
Click Format button > Patterns tab > Light green? > Ok

Click Add (this adds condition 2)

Make the settings under Condition 2:
Formula Is | =AND(ISNUMBER($B$1),$B$1<$A$1)
Click Format button > Patterns tab > Red? > Ok

Click OK at the main dialog

B1's fill color will be green or red depending

or < the number in A1

If B1 is blank or contains text (instead of numbers)
there'll be no conditional formatting activated,
i.e. the fill color of B1 will assume the default "no fill color"
(or whatever "original" fill color that you might have applied to B1)

--
Rgds
Max
xl 97
---
Please respond in thread
xdemechanik <at>yahoo<dot>com
----



.
 
M

Max

Glad to hear that, Eli !
And thanks for the feedback

Always strive to try out all suggestions posted
and provide feedback to the folks concerned
who answered your post
 

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