Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Binglesworth
 
Posts: n/a
Default How do I make an IF statement change cell shading

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?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default How do I make an IF statement change cell shading

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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Trevor Shuttleworth
 
Posts: n/a
Default How do I make an IF statement change cell shading

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


"Binglesworth" wrote in message
...
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?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Zack Barresse
 
Posts: n/a
Default How do I make an IF statement change cell shading

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

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


"Binglesworth" wrote in message
...
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?



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
via135
 
Posts: n/a
Default How do I make an IF statement change cell shading


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(A15,A1<=10) format as
you like
again Add
condition 3: select Formula Is =A110 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
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
------------------------------------------------------------------------
via135's Profile: http://www.excelforum.com/member.php...o&userid=26725
View this thread: http://www.excelforum.com/showthread...hreadid=527725



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default How do I make an IF statement change cell shading

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 formatConditional Formatting
Condition 1
Formula is: =AND(ISNUMBER(A1),A110)
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

"Binglesworth" wrote in message
...
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?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
How do I change a number in one cell to change a series of cells? lance559 Excel Discussion (Misc queries) 2 January 13th 06 08:56 PM
I Need a formula to evaluate a cell with + or - values Bob in Oklahoma Excel Worksheet Functions 6 October 31st 05 02:41 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
make a cell empty based on condition mpierre Charts and Charting in Excel 2 December 29th 04 01:01 PM


All times are GMT +1. The time now is 03:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"