if functions-Can you format cells?

G

Guest

Hi
Is it possible to use an if function to color a cell? If the value of a cell is greater than .5 shade it red, less than .5, blue
Thanks
Deb
 
K

Ken Wright

Format / Conditional Formatting - Put in the two conditions and choose the two
results you want to occur when each condition is true.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :)
----------------------------------------------------------------------------



Deb said:
Hi,
Is it possible to use an if function to color a cell? If the value of a cell
is greater than .5 shade it red, less than .5, blue?
 
G

Guest

I've tried and I can't get it to work

----- Ken Wright wrote: ----

Format / Conditional Formatting - Put in the two conditions and choose the tw
results you want to occur when each condition is true

--
Regard
Ken....................... Microsoft MVP - Exce
Sys Spec - Win XP Pro / XL 00/02/0

---------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-
---------------------------------------------------------------------------



Deb said:
Hi
Is it possible to use an if function to color a cell? If the value of a cel
is greater than .5 shade it red, less than .5, blue
 
P

Peo Sjoblom

It is not a very good answer, when you say I tried and you can't get it to
work,
what happened? Nothing? Got an error message? PC exploded?

Select the cell, do format>conditional formatting, cell value is greater
than or equal to 5,
click format button and select the formatting, click OK, click add button,
repeat but use less than 5,
format, click OK twice.

If the value is 5 and you don't want any formatting change the first to cell
value greater than 5
 
N

Norman Harker

Hi Deb!

Select the cell
Format > Conditional formatting
Cell Value Is
Select: "greater than"
0.5
Press Format button
Click Pattern tab
Select your colour
OK
Press Add
Cell Value Is
Select: "less than"
0.5
Press Format button
Click pattern tab
Select your colour
OK
OK

Note that 0.5 will not be coloured because it is not greater than 0.5
or less than 0.5. If you don't intend this, then vary the condition
that you select or give it a third conditional format.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
R

RagDyeR

Select A1, then
<Format. <ConditionalFormat>
Expand the first window, and click "Formula Is"
In the next window enter,
=AND(A1>0,A1<0.5)
Then click on the <Format> button, <Patterns> tab,
Click a blue you like, then <OK>

Now, click <Add>
Leave the first window "CellValueIs",
Expand the next window and choose "Greater Then"
Enter 0.5 in the third window.
Then click on the <Format> button, <Patterns> tab,
Click a red you like, then <OK> <OK>.

Just a comment.
You have not chosen any format if the cell is *exactly* 0.5 !

You can now click A1,and drag down to copy as needed.
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================



I've tried and I can't get it to work.

----- Ken Wright wrote: -----

Format / Conditional Formatting - Put in the two conditions and choose
the two
results you want to occur when each condition is true.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

-----------------------------------------------------------------------
-----
It's easier to beg forgiveness than ask permission :)
-----------------------------------------------------------------------
-----



Deb said:
Hi,
Is it possible to use an if function to color a cell? If the value of
a cell
is greater than .5 shade it red, less than .5, blue?
 
R

RagDyeR

Would like to correct the first conditional formula to:
=AND(A1<>0,A1<0.5)
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


Select A1, then
<Format. <ConditionalFormat>
Expand the first window, and click "Formula Is"
In the next window enter,
=AND(A1>0,A1<0.5)
Then click on the <Format> button, <Patterns> tab,
Click a blue you like, then <OK>

Now, click <Add>
Leave the first window "CellValueIs",
Expand the next window and choose "Greater Then"
Enter 0.5 in the third window.
Then click on the <Format> button, <Patterns> tab,
Click a red you like, then <OK> <OK>.

Just a comment.
You have not chosen any format if the cell is *exactly* 0.5 !

You can now click A1,and drag down to copy as needed.
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================



I've tried and I can't get it to work.

----- Ken Wright wrote: -----

Format / Conditional Formatting - Put in the two conditions and choose
the two
results you want to occur when each condition is true.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 00/02/03

-----------------------------------------------------------------------
-----
It's easier to beg forgiveness than ask permission :)
-----------------------------------------------------------------------
-----



Deb said:
Hi,
Is it possible to use an if function to color a cell? If the value of
a cell
is greater than .5 shade it red, less than .5, blue?
 
G

Guest

Thanks a lot.This worked. Guess I didn't understand the others

----- Norman Harker wrote: ----

Hi Deb

Select the cel
Format > Conditional formattin
Cell Value I
Select: "greater than
0.
Press Format butto
Click Pattern ta
Select your colou
O
Press Ad
Cell Value I
Select: "less than
0.
Press Format butto
Click pattern ta
Select your colou
O
O

Note that 0.5 will not be coloured because it is not greater than 0.
or less than 0.5. If you don't intend this, then vary the conditio
that you select or give it a third conditional format

--
Regard
Norman Harker MVP (Excel
Sydney, Australi
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments
available free to good homes
 
N

Norman Harker

Hi Deb!

Sometimes the step by step approach is better. When you post next time
it will be best to say you need a step by step guide and if you can't
get a solution to work, try and explain what you did and what you got.

Never be too embarrassed to admit to your difficulties here. We've all
had the same ones in spades.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 

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