Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / March 2006

Tip: Looking for answers? Try searching our database.

How do I make an IF statement change cell shading

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Binglesworth - 29 Mar 2006 19:30 GMT
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?
ceauke@yahoo.com - 29 Mar 2006 19:43 GMT
Hi

It is called conditional formatting.
on the menu -> Format -> 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 AUKE
Trevor Shuttleworth - 29 Mar 2006 19:51 GMT
Not 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

Trevor

> 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?
Zack Barresse - 29 Mar 2006 19:52 GMT
Hi there Binglesworth,

For your text, format the cell as you would normally format any cell.  We'll
let that be our "default" 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

Signature

Regards,
Zack Barresse, aka firefytr
To email, remove NOSPAM

> 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?
via135 - 29 Mar 2006 19:53 GMT
hi!

select your range (say A1:A10)

goto Format >> Conditional Formatting >>
condition 1 : select Formula Is: =A1<=5 format as your wish
then Add >>
condition 2 : select Formula Is: =AND(A1>5,A1<=10)  format as
you like
again Add>>
condition 3: select Formula Is =A1>10 format as per your choice

-via135                

Binglesworth Wrote:
> How do I a make an IF statement change the color of the cell based on
> the
[quoted text clipped - 3 lines]
> color of
> the text.  Can either be done?

Signature

via135

Biff - 29 Mar 2006 19:59 GMT
Hi!

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 format>Conditional Formatting
Condition 1
Formula is: =AND(ISNUMBER(A1),A1>10)
Click the Format button
Select the desired style(s)
OK
Click the ADD button
Condition 2
Formula is: =AND(ISNUMBER(A1),A1>=6)
Clcik the format button
Select the desired style(s)
OK out

Biff

> 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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.