Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ned Ned is offline
external usenet poster
 
Posts: 2
Default Alternate Row Coloring

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Alternate Row Coloring

=AND(MOD(ROW(),2)=0,COUNTA($A1:$C1))
--
David Biddulph

Ned wrote:
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



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Alternate Row Coloring

=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
.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 561
Default Alternate Row Coloring

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
.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Alternate Row Coloring

Or the same without the AND?
--
David Biddulph

"Stefi" wrote in message
...
=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
.





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 561
Default Alternate Row Coloring

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
.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Alternate Row Coloring

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" wrote in message
...
=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
.



.

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 561
Default Alternate Row Coloring

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" wrote in message
...
=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
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
calculating and coloring [email protected] Excel Worksheet Functions 1 January 9th 08 03:11 PM
tab coloring rmstafford Excel Worksheet Functions 2 April 24th 07 01:08 AM
coloring cells egarcia Excel Discussion (Misc queries) 0 November 29th 06 05:49 PM
coloring in rows koba Excel Discussion (Misc queries) 9 November 10th 05 05:57 AM
conditional coloring Krishna Mohan Excel Worksheet Functions 2 April 19th 05 02:02 PM


All times are GMT +1. The time now is 05:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"