PC Review


Reply
Thread Tools Rate Thread

Alternate Row Coloring

 
 
Ned
Guest
Posts: n/a
 
      15th Jan 2010
Hi, I came accross a formula that can be used as a condition in
Conditional Formatting for Alternate Row Coloring. The formula is "
=AND(MOD(ROW(),2),COUNTA($A1:$C1)) ". Now this formula works really
nice, however it is only limited to one color condition for example
"Yellow", while the second color remains as the background color
example "White". If I want to add a second color other than "White"
say "Red" what change do I need to make to the above formula so that I
can insert it as a 2nd condition in the Conditional formatting. So
that I can have Yellow and Red alternating

Appreciate any help. Thankyou

Ed
 
Reply With Quote
 
 
 
 
Stefi
Guest
Posts: n/a
 
      15th Jan 2010
=MOD(ROW(),2) for yellow
=NOT(AND(MOD(ROW(),2)) for red

The second condition COUNTA($A1:$C1) limits the scope of CF to rows in which
one of cells A:C are not blank.

--
Regards!
Stefi



„Ned†ezt Ã*rta:

> Hi, I came accross a formula that can be used as a condition in
> Conditional Formatting for Alternate Row Coloring. The formula is "
> =AND(MOD(ROW(),2),COUNTA($A1:$C1)) ". Now this formula works really
> nice, however it is only limited to one color condition for example
> "Yellow", while the second color remains as the background color
> example "White". If I want to add a second color other than "White"
> say "Red" what change do I need to make to the above formula so that I
> can insert it as a 2nd condition in the Conditional formatting. So
> that I can have Yellow and Red alternating
>
> Appreciate any help. Thankyou
>
> Ed
> .
>

 
Reply With Quote
 
מיכ×ל (מיקי) ×בידן
Guest
Posts: n/a
 
      15th Jan 2010
I believe you left out one right bracket and I think that:
=MOD(ROW(),0) will also produce the RED background.
Micky


"Stefi" wrote:

> =MOD(ROW(),2) for yellow
> =NOT(AND(MOD(ROW(),2)) for red
>
> The second condition COUNTA($A1:$C1) limits the scope of CF to rows in which
> one of cells A:C are not blank.
>
> --
> Regards!
> Stefi
>
>
>
> „Ned†ezt Ã*rta:
>
> > Hi, I came accross a formula that can be used as a condition in
> > Conditional Formatting for Alternate Row Coloring. The formula is "
> > =AND(MOD(ROW(),2),COUNTA($A1:$C1)) ". Now this formula works really
> > nice, however it is only limited to one color condition for example
> > "Yellow", while the second color remains as the background color
> > example "White". If I want to add a second color other than "White"
> > say "Red" what change do I need to make to the above formula so that I
> > can insert it as a 2nd condition in the Conditional formatting. So
> > that I can have Yellow and Red alternating
> >
> > Appreciate any help. Thankyou
> >
> > Ed
> > .
> >

 
Reply With Quote
 
David Biddulph
Guest
Posts: n/a
 
      15th Jan 2010
Or the same without the AND?
--
David Biddulph

"Stefi" <(E-Mail Removed)> wrote in message
news:2BF4716F-04AB-4BD6-939B-(E-Mail Removed)...
> =MOD(ROW(),2) for yellow
> =NOT(AND(MOD(ROW(),2)) for red
>
> The second condition COUNTA($A1:$C1) limits the scope of CF to rows in
> which
> one of cells A:C are not blank.
>
> --
> Regards!
> Stefi
>
>
>
> "Ned" ezt írta:
>
>> Hi, I came accross a formula that can be used as a condition in
>> Conditional Formatting for Alternate Row Coloring. The formula is "
>> =AND(MOD(ROW(),2),COUNTA($A1:$C1)) ". Now this formula works really
>> nice, however it is only limited to one color condition for example
>> "Yellow", while the second color remains as the background color
>> example "White". If I want to add a second color other than "White"
>> say "Red" what change do I need to make to the above formula so that I
>> can insert it as a 2nd condition in the Conditional formatting. So
>> that I can have Yellow and Red alternating
>>
>> Appreciate any help. Thankyou
>>
>> Ed
>> .
>>



 
Reply With Quote
 
מיכ×ל (מיקי) ×בידן
Guest
Posts: n/a
 
      15th Jan 2010
Ignore my CF formula.
Micky


"מיכ×ל (מיקי) ×בידן" wrote:

> I believe you left out one right bracket and I think that:
> =MOD(ROW(),0) will also produce the RED background.
> Micky
>
>
> "Stefi" wrote:
>
> > =MOD(ROW(),2) for yellow
> > =NOT(AND(MOD(ROW(),2)) for red
> >
> > The second condition COUNTA($A1:$C1) limits the scope of CF to rows in which
> > one of cells A:C are not blank.
> >
> > --
> > Regards!
> > Stefi
> >
> >
> >
> > „Ned†ezt Ã*rta:
> >
> > > Hi, I came accross a formula that can be used as a condition in
> > > Conditional Formatting for Alternate Row Coloring. The formula is "
> > > =AND(MOD(ROW(),2),COUNTA($A1:$C1)) ". Now this formula works really
> > > nice, however it is only limited to one color condition for example
> > > "Yellow", while the second color remains as the background color
> > > example "White". If I want to add a second color other than "White"
> > > say "Red" what change do I need to make to the above formula so that I
> > > can insert it as a 2nd condition in the Conditional formatting. So
> > > that I can have Yellow and Red alternating
> > >
> > > Appreciate any help. Thankyou
> > >
> > > Ed
> > > .
> > >

 
Reply With Quote
 
Stefi
Guest
Posts: n/a
 
      15th Jan 2010
Of course, I forgot to delete it, thank you for the warning!

--
Regards!
Stefi



„David Biddulph†ezt Ã*rta:

> Or the same without the AND?
> --
> David Biddulph
>
> "Stefi" <(E-Mail Removed)> wrote in message
> news:2BF4716F-04AB-4BD6-939B-(E-Mail Removed)...
> > =MOD(ROW(),2) for yellow
> > =NOT(AND(MOD(ROW(),2)) for red
> >
> > The second condition COUNTA($A1:$C1) limits the scope of CF to rows in
> > which
> > one of cells A:C are not blank.
> >
> > --
> > Regards!
> > Stefi
> >
> >
> >
> > "Ned" ezt Ã*rta:
> >
> >> Hi, I came accross a formula that can be used as a condition in
> >> Conditional Formatting for Alternate Row Coloring. The formula is "
> >> =AND(MOD(ROW(),2),COUNTA($A1:$C1)) ". Now this formula works really
> >> nice, however it is only limited to one color condition for example
> >> "Yellow", while the second color remains as the background color
> >> example "White". If I want to add a second color other than "White"
> >> say "Red" what change do I need to make to the above formula so that I
> >> can insert it as a 2nd condition in the Conditional formatting. So
> >> that I can have Yellow and Red alternating
> >>
> >> Appreciate any help. Thankyou
> >>
> >> Ed
> >> .
> >>

>
>
> .
>

 
Reply With Quote
 
מיכ×ל (מיקי) ×בידן
Guest
Posts: n/a
 
      15th Jan 2010
In your case - you may also consider to format ALL rows in one of the colors
and use only ONE CF coloring for the ODD or EVEN rows.
Micky


"Stefi" wrote:

> Of course, I forgot to delete it, thank you for the warning!
>
> --
> Regards!
> Stefi
>
>
>
> „David Biddulph†ezt Ã*rta:
>
> > Or the same without the AND?
> > --
> > David Biddulph
> >
> > "Stefi" <(E-Mail Removed)> wrote in message
> > news:2BF4716F-04AB-4BD6-939B-(E-Mail Removed)...
> > > =MOD(ROW(),2) for yellow
> > > =NOT(AND(MOD(ROW(),2)) for red
> > >
> > > The second condition COUNTA($A1:$C1) limits the scope of CF to rows in
> > > which
> > > one of cells A:C are not blank.
> > >
> > > --
> > > Regards!
> > > Stefi
> > >
> > >
> > >
> > > "Ned" ezt Ã*rta:
> > >
> > >> Hi, I came accross a formula that can be used as a condition in
> > >> Conditional Formatting for Alternate Row Coloring. The formula is "
> > >> =AND(MOD(ROW(),2),COUNTA($A1:$C1)) ". Now this formula works really
> > >> nice, however it is only limited to one color condition for example
> > >> "Yellow", while the second color remains as the background color
> > >> example "White". If I want to add a second color other than "White"
> > >> say "Red" what change do I need to make to the above formula so that I
> > >> can insert it as a 2nd condition in the Conditional formatting. So
> > >> that I can have Yellow and Red alternating
> > >>
> > >> Appreciate any help. Thankyou
> > >>
> > >> Ed
> > >> .
> > >>

> >
> >
> > .
> >

 
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
Coloring Alternate lines Jim Berglund Microsoft Excel Programming 3 31st May 2010 02:50 PM
alternate line coloring on continuous form =?Utf-8?B?Sm9obkU=?= Microsoft Access Form Coding 3 30th Jan 2008 08:30 AM
Coloring alternate rows in a datasheet Cindy Microsoft Access Forms 1 19th Aug 2004 10:48 PM
Alternate row coloring David Turner Microsoft Excel Programming 10 8th Nov 2003 02:59 AM
Re: Coloring Alternate Lines in Access table Allen Browne Microsoft Access VBA Modules 0 5th Sep 2003 02:31 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:07 AM.