close

How do I a make an IF statement change the color of the cell based on the
number inputted? For example I want 0-5 to be clear, 5-10 to be yellow, 10
to be red. I want to also change the text properties to change the color of
the text. Can either be done?

Hi

It is called conditional formatting.
on the menu -gt; Format -gt; Conditional format.

think about it. How would you use an if statement to change the shading
of that same cell while still having a value in that cell that's
independant of the if statement. So the bottomline is, whatever change
the shading of the cell HAS to be seperate from the cell value.
Therefore you can't controll it with a if but have to use conditional
formatting.

Rgds
CE AUKENot with an IF in the cell. What you could do is use the same IF Formula in
Conditional Formatting and change the format accordingly.

Regards

Trevorquot;Binglesworthquot; gt; wrote in message
...
gt; How do I a make an IF statement change the color of the cell based on the
gt; number inputted? For example I want 0-5 to be clear, 5-10 to be yellow,
gt; 10
gt; to be red. I want to also change the text properties to change the color
gt; of
gt; the text. Can either be done?
Hi there Binglesworth,

For your text, format the cell as you would normally format any cell. We'll
let that be our quot;defaultquot; format. Then, with the cell selected, go to Tools
| Conditional Formatting. You can add up to 2 more conditional formats, set
your cell values in the given drop downs to specified, change the format for
each condition to that which you want and click Ok.

HTH

--
Regards,
Zack Barresse, aka firefytr
To email, remove NOSPAMquot;Binglesworthquot; gt; wrote in message
...
gt; How do I a make an IF statement change the color of the cell based on the
gt; number inputted? For example I want 0-5 to be clear, 5-10 to be yellow,
gt; 10
gt; to be red. I want to also change the text properties to change the color
gt; of
gt; the text. Can either be done?

hi!

select your range (say A1:A10)

goto Format gt;gt; Conditional Formatting gt;gt;
condition 1 : select Formula Is: =A1lt;=5 format as your wish
then Add gt;gt;
condition 2 : select Formula Is: =AND(A1gt;5,A1lt;=10) format as
you like
again Addgt;gt;
condition 3: select Formula Is =A1gt;10 format as per your choice-via135
Binglesworth Wrote:
gt; How do I a make an IF statement change the color of the cell based on
gt; the
gt; number inputted? For example I want 0-5 to be clear, 5-10 to be
gt; yellow, 10
gt; to be red. I want to also change the text properties to change the
gt; color of
gt; the text. Can either be done?--
via135
------------------------------------------------------------------------
via135's Profile: www.excelforum.com/member.php...oamp;userid=26725
View this thread: www.excelforum.com/showthread...hreadid=527725Hi!

Use conditional formatting.

Your ranges overlap:

0-5 to be clear
5-10 to be yellow

If the number is 5 what color should it be? Clear or yellow?

Select the cell in question. I'll assume it's A1.
Goto formatgt;Conditional Formatting
Condition 1
Formula is: =AND(ISNUMBER(A1),A1gt;10)
Click the Format button
Select the desired style(s)
OK
Click the ADD button
Condition 2
Formula is: =AND(ISNUMBER(A1),A1gt;=6)
Clcik the format button
Select the desired style(s)
OK out

Biff

quot;Binglesworthquot; gt; wrote in message
...
gt; How do I a make an IF statement change the color of the cell based on the
gt; number inputted? For example I want 0-5 to be clear, 5-10 to be yellow,
gt; 10
gt; to be red. I want to also change the text properties to change the color
gt; of
gt; the text. Can either be done?

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()