IF Statements

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does anyone know how to use an IF statement to change the color of a cell??

An easy example: =IF(A1<=5,1,0). Can I change the value_if_true or
value_if_false to change the color of the cell?

Could probably read: =IF(A1<=5,1,"cell=green")

Thanks.
 
Hi,
You can use the Excel feature called COnditional Formating:
- Select cell A1
- go to menu Format > Conditional Formatting, choose:
'Cell Value Is' 'Greater Than' and enter 5
Click the Format button and choose the green pattern
Click OK
Click
From now on, the cell will be green when the value is greater than 5 and
regular format when less than or equal to 5

Regards,
Sebastien
 
Thank you. Just what I needed.

-Jeff

sebastienm said:
Hi,
You can use the Excel feature called COnditional Formating:
- Select cell A1
- go to menu Format > Conditional Formatting, choose:
'Cell Value Is' 'Greater Than' and enter 5
Click the Format button and choose the green pattern
Click OK
Click
From now on, the cell will be green when the value is greater than 5 and
regular format when less than or equal to 5

Regards,
Sebastien
 
As a follow up question, is there a way to also change the text in the box
when the conditional format is true?

For Example: I added CF in cell $B$10 for my summation in $A$10:
Condition 1: Formula is, =$A$1=1, format is blue cell
Condition 2: Formula is, =$A$1=0, format is red cell

I would like to add a changing text with each condition. Any
suggestions????
----------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top