PC Review


Reply
Thread Tools Rate Thread

Conditional formatting based on numbers in columns

 
 
Nic Daniels
Guest
Posts: n/a
 
      3rd Jul 2009

Hi,

I would like to change the background color of a two cells (row by row)
based on values in two other cells in the same row.


If C1>0 AND if C1>D1, the background color of cell A1 turns green and B1
turns red.

but If C1>0 AND C1=D1, the background colors of both cells, A1 and B1 turn
green.


Ex:
A B C D
1 Green Red 1 0
2 Green Green 12 12
3 No change in background color

Thank you!


--
Kind regards, Nic
 
Reply With Quote
 
 
 
 
Stefi
Guest
Posts: n/a
 
      3rd Jul 2009

Condition formula for Column A:
=AND(C1>0,C1>=D1)
Condition formula1 for Column B:
=AND(C1>0,C1>D1) red
=AND(C1>0,C1=D1) green

Regards,
Stefi

„Nic Daniels” ezt *rta:

> Hi,
>
> I would like to change the background color of a two cells (row by row)
> based on values in two other cells in the same row.
>
>
> If C1>0 AND if C1>D1, the background color of cell A1 turns green and B1
> turns red.
>
> but If C1>0 AND C1=D1, the background colors of both cells, A1 and B1 turn
> green.
>
>
> Ex:
> A B C D
> 1 Green Red 1 0
> 2 Green Green 12 12
> 3 No change in background color
>
> Thank you!
>
>
> --
> Kind regards, Nic

 
Reply With Quote
 
Mike H
Guest
Posts: n/a
 
      3rd Jul 2009

Hi,

For you first condition apply this to A1 and select Red

=AND(C1>0,C1>D1)

Click ADD and apply this second condition to A1 and choose Green

=AND(C1>0,C1=D1)

Repeat the above for B1 choosing the appropriate colours.

Mike

"Nic Daniels" wrote:

> Hi,
>
> I would like to change the background color of a two cells (row by row)
> based on values in two other cells in the same row.
>
>
> If C1>0 AND if C1>D1, the background color of cell A1 turns green and B1
> turns red.
>
> but If C1>0 AND C1=D1, the background colors of both cells, A1 and B1 turn
> green.
>
>
> Ex:
> A B C D
> 1 Green Red 1 0
> 2 Green Green 12 12
> 3 No change in background color
>
> Thank you!
>
>
> --
> Kind regards, Nic

 
Reply With Quote
 
Nic Daniels
Guest
Posts: n/a
 
      3rd Jul 2009

Thank you!




--
Kind regards, Nic


"Stefi" wrote:

> Condition formula for Column A:
> =AND(C1>0,C1>=D1)
> Condition formula1 for Column B:
> =AND(C1>0,C1>D1) red
> =AND(C1>0,C1=D1) green
>
> Regards,
> Stefi
>
> „Nic Daniels” ezt *rta:
>
> > Hi,
> >
> > I would like to change the background color of a two cells (row by row)
> > based on values in two other cells in the same row.
> >
> >
> > If C1>0 AND if C1>D1, the background color of cell A1 turns green and B1
> > turns red.
> >
> > but If C1>0 AND C1=D1, the background colors of both cells, A1 and B1 turn
> > green.
> >
> >
> > Ex:
> > A B C D
> > 1 Green Red 1 0
> > 2 Green Green 12 12
> > 3 No change in background color
> >
> > Thank you!
> >
> >
> > --
> > Kind regards, Nic

 
Reply With Quote
 
Nic Daniels
Guest
Posts: n/a
 
      3rd Jul 2009

Thank you!






--
Kind regards, Nic


"Mike H" wrote:

> Hi,
>
> For you first condition apply this to A1 and select Red
>
> =AND(C1>0,C1>D1)
>
> Click ADD and apply this second condition to A1 and choose Green
>
> =AND(C1>0,C1=D1)
>
> Repeat the above for B1 choosing the appropriate colours.
>
> Mike
>
> "Nic Daniels" wrote:
>
> > Hi,
> >
> > I would like to change the background color of a two cells (row by row)
> > based on values in two other cells in the same row.
> >
> >
> > If C1>0 AND if C1>D1, the background color of cell A1 turns green and B1
> > turns red.
> >
> > but If C1>0 AND C1=D1, the background colors of both cells, A1 and B1 turn
> > green.
> >
> >
> > Ex:
> > A B C D
> > 1 Green Red 1 0
> > 2 Green Green 12 12
> > 3 No change in background color
> >
> > Thank you!
> >
> >
> > --
> > Kind regards, Nic

 
Reply With Quote
 
Stefi
Guest
Posts: n/a
 
      6th Jul 2009
You are welcome! Thanks for the feedback!
Stefi

„Nic Daniels” ezt *rta:

> Thank you!
>
>
>
>
> --
> Kind regards, Nic
>
>
> "Stefi" wrote:
>
> > Condition formula for Column A:
> > =AND(C1>0,C1>=D1)
> > Condition formula1 for Column B:
> > =AND(C1>0,C1>D1) red
> > =AND(C1>0,C1=D1) green
> >
> > Regards,
> > Stefi
> >
> > „Nic Daniels” ezt *rta:
> >
> > > Hi,
> > >
> > > I would like to change the background color of a two cells (row by row)
> > > based on values in two other cells in the same row.
> > >
> > >
> > > If C1>0 AND if C1>D1, the background color of cell A1 turns green and B1
> > > turns red.
> > >
> > > but If C1>0 AND C1=D1, the background colors of both cells, A1 and B1 turn
> > > green.
> > >
> > >
> > > Ex:
> > > A B C D
> > > 1 Green Red 1 0
> > > 2 Green Green 12 12
> > > 3 No change in background color
> > >
> > > Thank you!
> > >
> > >
> > > --
> > > Kind regards, Nic

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting based on positive/negative numbers Nevyn Microsoft Excel Misc 2 7th Mar 2010 10:31 PM
Conditional function row formatting based on columns values being medic Microsoft Excel Misc 2 6th Nov 2009 06:33 PM
Conditional formatting based on max in range of other columns Steve Microsoft Excel Worksheet Functions 2 22nd Sep 2009 04:57 PM
Conditional Formatting Based of Cells Based on Data Entry in anoth Jim Microsoft Excel Misc 3 11th Nov 2008 11:52 PM
conditional Formatting based on cell formatting Totom Microsoft Excel Worksheet Functions 1 20th Jan 2007 02:02 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:34 AM.