Computing.Net > Forums > Office Software > change excel cell colour using If

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

change excel cell colour using If

Reply to Message Icon

Name: doobie
Date: February 17, 2009 at 10:14:38 Pacific
OS: Windows Vista
CPU/Ram: 2GB
Product: Ibm / R61i
Subcategory: Microsoft Office
Comment:

hey, in excel 2000 i have set a condition in a cell as follows: IF((A44+C44)<C47,"Pass","Fail") and i would like to know how to turn the cell green if the result is "pass" and red if the result is "fail"



Sponsored Link
Ads by Google

Response Number 1
Name: DerbyDad03
Date: February 17, 2009 at 11:55:58 Pacific
Reply:

Use Conditional Formatting with the following conditions:

Assuming the cell with the IF statement is A1:

Format...Conditional Formatting

Condition 1
Formula is - =IF(A1="Pass",TRUE,FALSE)
Format...Pattern...Green

Condition 2
Formula is - =IF(A1="Fail",TRUE,FALSE)
Format...Pattern...Red


0

Response Number 2
Name: Mike (by mmcconaghy)
Date: February 17, 2009 at 12:42:00 Pacific
Reply:

Another way of doing the same thing is with the AND function
This function tests two or more conditions to see if they are all true.
And there can be up to 30 possible tests.

The steps are the same as DerbyDad03 showed but the formula is different.

1st – Select the cell in which your formula is located

On the Menu Bar:

2nd - Format
3rd - Conditional Formatting
4th – Change “Cell Value is” to “Formula Is”
5th – Enter the formula:

=AND((A44+C44)<C47)

Sub Menu Format :
6th - Patterns
7th - Choose Green
8th - Press OK

9th Select ADD
10th – Change “Cell Value is” to “Formula Is”
11th – Enter the formula:

=AND((A44+C44)>C47)

Sub Menu Format :
12th - Patterns
13th - Choose Red
14th - Press OK
15th - Press OK

There is only one test going on here, but with a little imagination, you could do more.

MIKE


0

Response Number 3
Name: Mike (by mmcconaghy)
Date: February 17, 2009 at 13:16:28 Pacific
Reply:

You may have to change your formula.
As it is you are checking for
Greater Than and Less Than,
but what happens if it is an exact match?

MIKE


0

Response Number 4
Name: Mike (by mmcconaghy)
Date: February 17, 2009 at 13:18:10 Pacific
Reply:

That should be -My- formulas, not yours.

MIKE


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: change excel cell colour using If

changing excel cell color www.computing.net/answers/office/changing-excel-cell-color/9608.html

Excel cell colour change if edited www.computing.net/answers/office/excel-cell-colour-change-if-edited/7041.html

Change Excel text color based on data range www.computing.net/answers/office/change-excel-text-color-based-on-data-range/8807.html