MrExcel Publishing
Your One Stop for Excel Tips & Solutions

conditional formating


Posted by Mike Beckage on January 24, 2002 11:47 AM

Is there a way to conditionally format a whole row or column

For instance if the row contains a negative number make the fill color for the entire row light red?

Thanks


Posted by Juan Pablo G. on January 24, 2002 11:49 AM

How's this ?

Select the column (Assuming C). In formula is put

=MIN(C:C) < 0<p>and select the pattern you want.

Juan Pablo G.

Posted by Mike beckage on January 24, 2002 12:36 PM

I not sure I understand
if I have a row that is 1,1,1,-1,1,1
i can easily use the conditional format to make the -1 red

however i want to make the whole row red


is there a way to do this

Posted by Juan Pablo G. on January 24, 2002 12:43 PM

Select the row (I assume is Row 2) Go to Conditional Formatting, and put in "Formula Is" this formula

=MIN(2:2) < 0<p>and click the Format button, and select the format.

That way, if there's a number less than 0, the row will highlight

Juan Pablo G.

Posted by Mike Beckage on January 24, 2002 1:10 PM

Thanks Juan

Is there a way to do IF then formulas for instance the worksheet look like this
A B C
Year month sales
2000 3 1000
2000 4 2000
2000 6 568
2001 5 1000
2001 7 50
2001 9 3500
2002 5 900
2002 7 800

to conditionally format as follows
If year(a)=2000 then the whole row is red
if year =2001 the whole row is green
if year =2002 then whole row is blue

thanks

Posted by Juan Pablo G. on January 24, 2002 1:13 PM

Select the entire rows (I'm assuming you start in Row1). (You only get up to three conditions)

I see year is in Column A, so put in this formula

=$A1=2000

and select Red. Click "Add"
put this formula
=$A1=2001
and select Green.
Click "Add" again, and put
=$A1=2002
and select Blue.

Click Ok

Juan Pablo G.