Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Change cell color for valid if statement

When using an "IF" formula and the value is true, how do i change the color
in the results cell. I.E. if A61,"black", how do i get the cell to turn
black and say black
  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: Change cell color for valid if statement

  1. Select the cell that you want to apply the conditional formatting to.
  2. Go to the Home tab in the ribbon and click on Conditional Formatting in the Styles group.
  3. Select New Rule from the drop-down menu.
  4. In the New Formatting Rule dialog box, select Use a formula to determine which cells to format.
  5. In the Format values where this formula is true field, enter your
    Code:
    IF
    formula. For example, if you want the cell to turn black if A6 is greater than 1, enter the formula
    Code:
    =A61
    .
  6. Click on the Format button to choose the formatting you want to apply to the cell. In this case, you want to change the font color to black, so select the Font tab and choose black from the color palette.
  7. Click OK to close the Format Cells dialog box.
  8. Click OK again to close the New Formatting Rule dialog box.

Now, when the
Code:
IF
formula evaluates to true, the cell will turn black. If you want the cell to display the word "black" as well, you can modify your formula to include it. For example,
Code:
=IF(A61,"black","")
will display "black" in the cell when A6 is greater than 1, and leave the cell blank otherwise.
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 506
Default Change cell color for valid if statement

You can do it by using Conditional Formatting. Have a look in the below
links for more details about it.

http://contextures.com/xlCondFormat01.html
http://contextures.com/xlCondFormat02.html
http://contextures.com/xlCondFormat03.html

Remember to Click Yes, if this post helps!

--------------------
(Ms-Exl-Learner)
--------------------


"Chris H" wrote:

When using an "IF" formula and the value is true, how do i change the color
in the results cell. I.E. if A61,"black", how do i get the cell to turn
black and say black

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Change cell color for valid if statement

Welcome to the world of conditional formats!

The formula in the cell will be:
=IF(A61,"black","")

With the cell selected, goto Format - Conditional format.
"Cell value is", "equal to", black
Hit the format button, and choose appropriate font/pattern color.

Alternatively, if you don't need the word black to appear in the cell, your
conditional format would be:
"Formula is", =A61

For more help/guidance, check out the XL help file on conditional formatting.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Chris H" wrote:

When using an "IF" formula and the value is true, how do i change the color
in the results cell. I.E. if A61,"black", how do i get the cell to turn
black and say black

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
How to change cell background color as part of the If statement? Jim H Excel Worksheet Functions 2 September 23rd 09 11:58 PM
Change the color of a cell or text with an if statement Oddcarout Excel Discussion (Misc queries) 10 September 8th 07 12:16 AM
Change Cell Color Based on IF Statement Cathy Excel Worksheet Functions 3 December 16th 05 09:57 PM
Change Color on an IF statement craigwojo Excel Worksheet Functions 0 November 8th 04 03:55 AM
Change Color on an IF statement craigwojo Excel Worksheet Functions 1 November 8th 04 01:14 AM


All times are GMT +1. The time now is 11:38 PM.

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

About Us

"It's about Microsoft Excel"