Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 921
Default IF Statements

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default IF Statements

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

"Jeff" wrote:

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 921
Default IF Statements

Thank you. Just what I needed.

-Jeff

"sebastienm" wrote:

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

"Jeff" wrote:

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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 921
Default IF Statements

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????
----------------------------------------

"sebastienm" wrote:

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

"Jeff" wrote:

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.

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
IF statements dannyboy8 Excel Worksheet Functions 1 May 14th 08 05:10 PM
If statements Conan Kelly Excel Discussion (Misc queries) 1 January 31st 08 08:22 PM
IF Statements (Mutliple Statements) Deezel Excel Worksheet Functions 3 October 19th 06 06:13 AM
if statements qwerty_2006 Excel Worksheet Functions 3 March 12th 06 08:09 AM
IF and OR statements Loraloo Excel Discussion (Misc queries) 3 March 4th 06 11:42 PM


All times are GMT +1. The time now is 10:00 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"