![]() |
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? |
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 |
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? |
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? |
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 |
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? |
All times are GMT +1. The time now is 08:32 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com